#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using pii = pair<ll, ll>;
using vi = vector<ll>;
using vvi = vector<vi>;
#define rep(i, a, b) for(ll i = a; i < (b); ++i)
#define all(x) begin(x),end(x)
#define sz(x) (int)(x).size()

int main() {
    cin.tie(0)->sync_with_stdio(0);
    cin.exceptions(cin.failbit);
    cout << setprecision(9) << fixed;
    ll n, a, b;
    cin >> n >> a >> b;
    vi d(n - 1);
    for (auto& x : d) cin >> x;
    vector<pii> ans{{-a, -b}}; // target at 0,0
    ll remainder = reduce(all(d));
    if (((remainder ^ a ^ b) & 1) || remainder < abs(a) + abs(b)) return cout << "NO\n", 0;
    bool on_edge = remainder == abs(a) + abs(b);
    for (auto dcur : d) {
        auto [px, py] = ans.back();
        remainder -= dcur;
        if (on_edge) {
            ll zx = min(dcur, abs(px));
            dcur -= zx;
            px += zx * (px < 0 ?: -1);
            py += dcur * (py < 0 ?: -1);
        } else if (abs(px) + abs(py) + dcur <= remainder) {
            px += dcur * (px >= 0 ?: -1);
        } else {
            on_edge = true;
            ll furthest = abs(px) + abs(py) + remainder;
            if (furthest < dcur) return cout << "NO\n", 0;
            // Else this should be doable.
            bool yflip = py < 0; py = abs(py);
            bool xflip = px < 0; px = abs(px);
            bool xyswap = py < px; if (xyswap) swap(px, py);
            bool found = false; ll foundx = 0, foundy = 0;
            { // Upper left
                ll min_dist = remainder + px - py;
                ll max_dist = remainder + px + py;
                if (min_dist <= dcur && dcur <= max_dist) {
                    assert (!((dcur ^ min_dist) & 1));
                    ll steps_from_max = (max_dist - dcur) / 2;
                    found = true;
                    foundx = -remainder + steps_from_max;
                    foundy = steps_from_max;
                }
            }
            if (!found) { // Upper-Right
                ll min_dist = remainder - px - py; // ??
                ll max_dist = remainder - px + py; // ??
                if (min_dist <= dcur && dcur <= max_dist) {
                    assert (!((dcur ^ min_dist) & 1));
                    ll steps_from_max = (max_dist - dcur) / 2;
                    found = true;
                    foundx = remainder - steps_from_max;
                    foundy = steps_from_max;
                }
            }
            assert(found);
            if (xyswap) swap(foundx, foundy);
            if (xflip) foundx *= -1;
            if (yflip) foundy *= -1;
            px = foundx, py = foundy;
        }
        ans.emplace_back(px, py);
    }
    rep(i, 0, n - 1) {
        // assert(!(d[i] != abs(ans[i].first - ans[i + 1].first) + abs(ans[i].second - ans[i + 1].second)));
        while (d[i] != abs(ans[i].first - ans[i + 1].first) + abs(ans[i].second - ans[i + 1].second)) cerr << "HI";
    }
    cout << "YES\n";
    for (auto [x, y] : ans)
        cout << x + a << ' ' << y + b << '\n';
}