import sys

n = int(input())

nx, ny = map(int, input().split())
d = list(map(int, input().split()))

res = [None for _ in range(n - 1)]

def uv(x, y):
    return x + y, x - y

def xy(u, v):
    x = (u + v) // 2
    y = (u - v) // 2
    return x, y

def solve_jump(l, r, d, x, y):
    # u = x + y, v = x -y
    u = x + y
    v = x - y
    u0, v0 = uv(-r, 0)
    u1, v1 = uv(-l, 0)
    u2, v2 = uv(l, 0)
    u3, v3 = uv(r, 0)
    
    # intersect: thin - fat
    # r - d
    if u0 <= u + d <= u3 and v - d <= v0 <= v + d:
        return xy(u + d, v0)
    
    # r - u
    if u0 <= u + d <= u3 and v - d <= v3 <= v + d:
        return xy(u + d, v3)
    
    # r - d1
    if u1 <= u + d <= u2 and v - d <= v2 <= v + d:
        return xy(u + d, v2)

    # r - u1
    if u1 <= u + d <= u2 and v - d <= v1 <= v + d:
        return xy(u + d, v1)
    
    ###

    # l - d
    if u0 <= u - d <= u3 and v - d <= v0 <= v + d:
        return xy(u - d, v0)
    
    # l - u
    if u0 <= u - d <= u3 and v - d <= v3 <= v + d:
        return xy(u - d, v3)
    
    # l - d1
    if u1 <= u - d <= u2 and v - d <= v2 <= v + d:
        return xy(u - d, v2)

    # l - u1
    if u1 <= u - d <= u2 and v - d <= v1 <= v + d:
        return xy(u - d, v1)
    
    ### 

    # u - l
    if v0 <= v + d <= v3 and u - d <= u0 <= u + d:
        return xy(u0, v + d)

    # u - r
    if v0 <= v + d <= v3 and u - d <= u3 <= u + d:
        return xy(u3, v + d)

    # u - l1
    if v1 <= v + d <= v2 and u - d <= u1 <= u + d:
        return xy(u1, v + d)

    # u - r1
    if v1 <= v + d <= v2 and u - d <= u2 <= u + d:
        return xy(u2, v + d)

    ###

    # d - l
    if v0 <= v - d <= v3 and u - d <= u0 <= u + d:
        return xy(u0, v - d)

    # d - r
    if v0 <= v - d <= v3 and u - d <= u3 <= u + d:
        return xy(u3, v - d)

    # d - l1
    if v1 <= v - d <= v2 and u - d <= u1 <= u + d:
        return xy(u1, v - d)

    # d - r1
    if v1 <= v - d <= v2 and u - d <= u2 <= u + d:
        return xy(u2, v - d)

    # No intersections - any point is fine
    return (x + d, y)

def rec_solve(i, l, r):
    # Solve the i-th one if the current circle is l..r (inclusive)
    if i == n - 1:
        # End
        # Check whether the final statue is in here
        dl = abs(nx) + abs(ny)
        if dl % 2 != l % 2 or not (l <= dl <= r):
            # Nope
            print("NO")
            sys.exit(0)
        
        # OK - we want to end here
        return (nx, ny)
    

    cd = d[i]
    new_r = r + cd
    if cd > r:
        # The inner radius is going to be defined by going left from r
        new_l = cd - r
        
    elif cd >= l:
        # The inner radius is going to match the parity
        new_l = (l + cd) % 2
    else:
        # The inner radius is defined by going inwards from l
        new_l = l - cd
    
    tx, ty = rec_solve(i + 1, new_l, new_r)
    # We have target coordinates to reach
    # Find where this statue has to be for the jump to be valid
    cx, cy = solve_jump(l, r, cd, tx, ty)
    res[i] = (cx, cy)
    return cx, cy


rec_solve(0, 0, 0)
print("YES")
for p in res:
    print(*p)
print(nx, ny)