#include <bits/stdc++.h> using namespace std; const int c=55; long long n, x[c], y[c], d[c]; bool jo(int kezd) { long long sum=0, maxval=0, ert=abs(x[n]-x[kezd])+abs(y[n]-y[kezd]); sum=maxval=ert; for (int i=kezd; i<n; i++) { sum+=d[i]; maxval=max(maxval, d[i]); } return (sum%2==0 && 2*maxval<=sum); } int main() { cin >> n >> x[n] >> y[n]; long long sum=0, maxval=0; d[n]=abs(x[n]+y[n]); for (int i=1; i<n; i++) { cin >> d[i]; } for (int i=1; i<=n; i++) { sum+=d[i]; maxval=max(maxval, d[i]); } if (sum%2 || 2*maxval>sum) { cout << "NO\n"; return 0; } for (int i=1; i<n-1; i++) { x[i+1]=x[i], y[i+1]=y[i]; x[i+1]=x[i]+d[i]; if (jo(i+1)) continue; x[i+1]=x[i]-d[i]; if (jo(i+1)) continue; x[i+1]=x[i]; y[i+1]=y[i]+d[i]; if (jo(i+1)) continue; y[i+1]=y[i]-d[i]; if (jo(i+1)) continue; assert(false); } cout << "YES\n"; for (int i=1; i<=n; i++) { cout << x[i] << " " << y[i] << "\n"; } return 0; } /* 4 10 6 7 8 5 */