#include <bits/stdc++.h>
using namespace std;
#define fwd(i, a, n) for(int i = (a); i < (n); i++)
#define rep(i, n) fwd(i, 0, n)
#define all(X) X.begin(), X.end()
#define sz(X) int(size(X))
#define pb push_back
#define eb emplace_back
#define st first
#define nd second
using pii = pair<int, int>; using vi = vector<int>;
using ll = long long; using ld = long double;
#ifdef LOC
auto SS = signal(6, [](int) {* (int *) 0 = 0;});
#define DTP(x, y) auto operator << (auto& o, auto a) -> decltype(y, o) {o << "("; x; return o << ")";}
DTP(o << a.st << ", " << a.nd, a.nd);
DTP(for(auto i : a) o << i << ", ", all(a));
void dump(auto... x) {((cerr << x << ", "), ...) << "\n";}
#define deb(x...) cerr << setw(4) << __LINE__ << ":[" #x "]: ", dump(x)
#else
#define deb(...) 0
#endif

pair<ll, ll> add(ll a, ll b, ll d){
    a = a - d;
    b = b + d;
    if(a < 0){
        if(b % 2 == 0){
            a = 0;
        }else{
            a = 1;
        }
    }
    return {a, b};
}

bool intersectVert(ll a, ll b, ll x, ll y1, ll y2, pair<ll, ll>& res){
    if(x < -b || b < x)return false;
    if(-a < x && x < a){
        if(y1 >= 0){
            ll c = max(a, y1);
            ll d = min(b, y2);
            if(c <= d){
                res = {x, c};
                return true;
            }else{
                return false;
            }
        }else if(y2 <= 0){
            ll c = max(-b, y1);
            ll d = min(-a, y2);
            if(c <= d){
                res = {x, c};
                return true;
            }else{
                return false;
            }
        }else{
            if(a <= y2){
                res = {x, a};
                return true;
            }else if(-a >= y1){
                res = {x, -a};
                return true;
            }else{
                return false;
            }
        }
    }else{
        ll c = max(y1, -b);
        ll d = min(y2, b);
        if(c <= d){
            res = {x, c};
            return true;
        }else{
            return false;
        }
    }
    return false;
}

bool intersectHor(ll a, ll b, ll y, ll x1, ll x2, pair<ll, ll>& res){
    bool ans = intersectVert(a, b, y, x1, x2, res);
    if(ans){
        res = {res.nd, res.st};
        return true;
    }
    return false;
}

pair<ll, ll> intersect(ll a, ll b, ll x, ll y, ll d){
    pair<ll, ll> res;
    if(intersectVert(a, b, x - d, y - d, y + d, res))return res;
    if(intersectVert(a, b, x + d, y - d, y + d, res))return res;
    if(intersectHor(a, b, y - d, x-d, x+d, res))return res;
    if(intersectHor(a, b, y + d, x-d, x+d, res))return res;
    assert(false);
}

int32_t main(){
    cin.tie(0)->sync_with_stdio(0);
    cout << fixed << setprecision(10);
    int n; cin >> n;
    ll x1, y1; cin >> x1 >> y1;
    ll x = x1 + y1;
    ll y = x1 - y1;
    vector<ll> d(n-1);
    rep(i, n-1)cin >> d[i];
    vector<ll> a(n);
    vector<ll> b(n);
    a[0] = b[0] = 0;
    a[1] = b[1] = d[0];
    for(int i = 2; i < n; i++){
        auto [j, k] = add(a[i-1], b[i-1], d[i-1]);
        a[i] = j;
        b[i] = k;
    }
    deb(a);
    deb(b);
    ll total = max(abs(x), abs(y));
    if(a[n-1] <= total && total <= b[n-1] && (total - a[n-1]) % 2 == 0){
        cout << "YES\n";
        vector<pair<ll, ll>> points(n);
        points[n-1] = {x, y};
        points[0] = {0, 0};
        for(int i = n-2; i >= 1; i--){
            points[i] = intersect(a[i], b[i], points[i+1].st, points[i+1].nd, d[i]);
        }
        for(int i = 0; i < n; i++){
            ll p = (points[i].st + points[i].nd) / 2;
            ll q = (points[i].st - points[i].nd) / 2;
            cout << p << " " << q << "\n";
        }
    }else{
        cout << "NO\n";
    }
    return 0;
}