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

#define all(x) ::begin(x), ::end(x)
#define tsolve int t; cin >> t; while (t--) solve
#define sz(x) (int)::size(x)
using ll = long long;
using ld = long double;

ll n, a, b;
vector<ll> d;

void solve() {
    cin >> n;
    cin >> a >> b;

    ll s = 0;
    d.resize(n - 1);
    for (ll& x : d) {
        cin >> x;
        s += x;
    }
    s -= a + b;
    if (s < 0 || s % 2 != 0) {
        cout << "NO\n";
        return;
    }
    cout << "YES\n";

    s /= 2;
    ll t = 0;
    cout << 0 << ' ' << 0 << '\n';
    for (ll x : d) {
        t += x;

        if (t < s) cout << 0 << ' ' << -t << '\n'; else
        if (t < s + a) cout << (t - s) << ' ' << -s << '\n'; else
            cout << a << ' ' << (t - (2 * s + a)) << '\n';
    }
}

int main() {
    cout.tie(0)->sync_with_stdio(false);
    cout << setprecision(16);
    solve();
}