n=int(input())
a,b=map(int,input().split())
d=list(map(int,input().split()))

def D(a,b):
    return abs(a)+abs(b)

mx=sum(d)
mn=d[0]-sum(d[1:])

if D(a,b)%2!=mx%2:
    print("NO")
    exit(0)

if D(a,b)>mx or D(a,b)<mn:
    print("NO")
    exit(0)


MN=[d[0]]
MX=[d[0]]

for i in range(1,n-1):
    MX.append(MX[-1]+d[i])
    MN.append(MN[-1]-d[i])

pos=[None]*n
pos[0]=(0,0)
pos[-1]=(a,b)
def sheb(x,y):
    return max(abs(x),abs(y))
def intersect(d1,d2,pos):
    # find a point d1 from (0,0) and d2 from pos
    x,y = pos
    x,y = (x+y),(x-y)
    for dx in [-d1,d1,d2+x,x-d2]:
        for dy in [-d1,d1,d2+y,y-d2]:
            if sheb(dx,dy)==d1 and sheb(x-dx,y-dy)==d2:
                return (dx+dy)//2, (dx-dy)//2


def solve(mx,mn,d,pos):
    if (p:=intersect(mx,d,pos)):
        return p
    if mn>0 and (p:=intersect(mn,d,pos)):
        return p
    return (pos[0]+d,pos[1])

for i in range(n-2,0,-1):
    pos[i]=solve(MX[i-1],MN[i-1],d[i],pos[i+1])

print("YES")
for x,y in pos:
    print(x,y)

for i in range(n-1):
    assert(D(pos[i][0]-pos[i+1][0],pos[i][1]-pos[i+1][1])==d[i])