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

#define rep(i, a, b) for(int i=a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define fo(i, b) for(int i=0; i < (b); ++i)
#define F first
#define S second
#define MP make_pair
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
pll MPL(ll A, ll B){ return {A,B};}

#define int ll

#define D if(0)

const int NMAX = 150;

pll operator + (pll A, pll B)
{
	return {A.F + B.F, A.S + B.S};
}
pll operator - (pll A, pll B)
{
	return {A.F - B.F, A.S - B.S};
}

ll a,b,x,y;
	int n, dc=0;
pll rectpt(ll d)
{
	pll out = {0,0};
	{ll e=min(d,y); out = out+ MPL(-e, 0); d-=e;}
	{ll e=min(d,b+x); out = out+ MPL(0,e); d-=e;}
	{ll e=min(d,y+a); out = out+ MPL(e,0); d-=e;}
	{ll e=min(d,x); out = out+ MPL(0,-e); d-=e;}
	return out;
}
void calcx()
{
	x = (dc-2*y-a-b)/2;
	D printf("x=%lld y=%lld\n", x, y);
}

ll curplace=0;
pll walk(ll d)
{
	curplace += d;
	return rectpt(curplace) - rectpt(curplace-d);
}

pll vectors[NMAX];
	ll d[NMAX];

void go(int i)
{vectors[i]=walk(d[i]);}

signed main() {
	cin.tie(0)->sync_with_stdio(0);
	cin.exceptions(cin.failbit);

	cin >> n >> a >> b;
	bool swapab = b>a;
	if(swapab){swap(a,b);}
	fo(i, n-1) {
		cin >> d[i];
		dc += d[i];
	}
	if ((a+b > dc) || ((a + b) % 2 != dc % 2)) {
		cout << "NO" << endl;
		return 0;
	}

	int maxind = 0;
	fo(i,n-1) if(d[i]>d[maxind]) maxind = i;
	ll M = d[maxind];

	y=0;
	if(M < (dc-b-a)/2)
	{
		D printf("W1");
		y = (dc-2*M-a-b)/2;
		calcx();
		fo(i,n) if(i!=maxind) go(i);
		go(maxind);
	}
	else if(M <= dc/2)
	{
		D printf("W2");
		calcx();
		fo(i,n) if(i!=maxind) go(i);
		go(maxind);
	}
	else
	{
		D printf("W3");
		calcx();
		go(maxind);
		fo(i,n) if(i!=maxind) go(i);
	}



	vector<pll> points(n);
	points[0] = MPL(0,0);
	fo(i,n-1) points[1+i] = points[i]+vectors[i];
	cout << "YES" << endl;
	if(swapab)
	{
		for (auto [x, y]: points) cout << y << " " << x << endl;
	}
	else
	{
		for (auto [x, y]: points) cout << x << " " << y << endl;
	}
}