There is an old tradition of keeping 4 boxes of candies in the house in Cyberland. The numbers of candies are special if their arithmetic mean, their median and their range are all equal. By definition, for a set {x_1, x_2, x_3, x_4} (x_1 ≤ x_2 ≤ x_3 ≤ x_4) arithmetic mean is $\frac{x_{1} + x_{2} + x_{3} + x_{4}}{4}$, median is $\frac{x_{2} + x_{3}}{2}$ and range is x_4 - x_1. The arithmetic mean and median are not necessary integer. It is well-known that if those three numbers are same, boxes will create a "debugging field" and codes in the field will have no bugs.

For example, 1, 1, 3, 3 is the example of 4 numbers meeting the condition because their mean, median and range are all equal to 2.

Jeff has 4 special boxes of candies. However, something bad has happened! Some of the boxes could have been lost and now there are only n (0 ≤ n ≤ 4) boxes remaining. The i-th remaining box contains a_{i} candies.

Now Jeff wants to know: is there a possible way to find the number of candies of the 4 - n missing boxes, meeting the condition above (the mean, median and range are equal)?


-----Input-----

The first line of input contains an only integer n (0 ≤ n ≤ 4).

The next n lines contain integers a_{i}, denoting the number of candies in the i-th box (1 ≤ a_{i} ≤ 500).


-----Output-----

In the first output line, print "YES" if a solution exists, or print "NO" if there is no solution.

If a solution exists, you should output 4 - n more lines, each line containing an integer b, denoting the number of candies in a missing box.

All your numbers b must satisfy inequality 1 ≤ b ≤ 10^6. It is guaranteed that if there exists a positive integer solution, you can always find such b's meeting the condition. If there are multiple answers, you are allowed to print any of them.

Given numbers a_{i} may follow in any order in the input, not necessary in non-decreasing.

a_{i} may have stood at any positions in the original set, not necessary on lowest n first positions.


-----Examples-----
Input
2
1
1

Output
YES
3
3

Input
3
1
1
1

Output
NO

Input
4
1
2
2
3

Output
YES



-----Note-----

For the first sample, the numbers of candies in 4 boxes can be 1, 1, 3, 3. The arithmetic mean, the median and the range of them are all 2.

For the second sample, it's impossible to find the missing number of candies.

In the third example no box has been lost and numbers satisfy the condition.

You may output b in any order.

Difficulty: interview

Starter code:

Solutions:
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
a = sorted(a)
#print(a)
if n == 0:
    print('YES')
    print(1)
    print(1)
    print(3)
    print(3)
elif n == 1:
    print('YES')
    print(a[0])
    print(3 * a[0])
    print(3 * a[0])
elif n == 2:
    if a[0] * 3 >= a[1]:
        print('YES')
        print(a[0] * 3)
        print(a[0] * 4 - a[1])
    elif a[1] % 3 == 0 and a[1] // 3 <= a[0]:
        print('YES')
        print(a[1] // 3)
        print(a[1] + a[1] // 3 - a[0])
    elif (a[0] + a[1]) % 4 == 0 and (a[0] + a[1]) // 4 <= a[0]:
        print('YES')
        print((a[0] + a[1]) // 4)
        print(3 * ((a[0] + a[1]) // 4))
    else:
        print('NO')
elif n == 3:
    if a[0] * 3 >= a[2] and 4 * a[0] == a[1] + a[2]:
        print('YES')
        print(a[0] * 3)
    elif a[2] % 3 == 0 and a[2] // 3 <= a[0] and a[2] + a[2] // 3 == a[0] + a[1]:
        print('YES')
        print(a[2] // 3)
    elif a[2] == a[0] * 3:
        print('YES')
        print(4 * a[0] - a[1])
    else:
        print('NO')
elif n == 4:
    if a[3] == 3 * a[0] and a[0] + a[3] == a[1] + a[2]:
        print('YES')
    else:
        print('NO')

n = int(input())
a = []
for i in range(n):
    a.append(int(input()))    
a.sort()    
res = None
if n == 0:
    res = [1, 1, 3, 3]
elif n == 1:
    res = [a[0], 3*a[0], 3*a[0]]
elif n == 2 and a[1] <= 3*a[0]:
    res = [a[0]*4 - a[1], a[0]*3]
elif n == 3:
    for v in range(1501):
        s = a + [v]
        s.sort()
        if s[0]*3 == s[3] and s[1] + s[2] == 4*s[0]:
            res = [v]
            break
elif n == 4 and a[0]*3 == a[3] and a[1] + a[2] == 4*a[0]:
    res = []
if res == None:
    print('NO')
else:
    print('YES')
    for b in res:
        print(b)



def check(a, b, c, d):
    bad = [a, b, c, d]
    bad.sort()
    x, y, z, w = bad[0], bad[1], bad[2], bad[3]
    if w == 3*x and x+w==y+z:
        return True
    return False
a = int(input())
if a == 0:
    print("YES")
    print("1")
    print("1")
    print("3")
    print("3")
if a == 1:
    x = int(input())
    print("YES")
    print(x)
    print(3*x)
    print(3*x)
if a == 2:
    x = int(input())
    y = int(input())
    x, y = min(x, y), max(x, y)
    if y > 3 * x:
        print("NO")
    else:
        print("YES")
        print(4*x-y)
        print(3*x)
if a == 3:
    nums = [int(input()) for i in range(3)]
    nums.sort()
    x, y, z = nums[0], nums[1], nums[2]
    for i in range(1, 10**5):
        if check(x, y, z, i):
            print("YES")
            print(i)
            quit()
    print("NO")
if a == 4:
    nums = [int(input()) for i in range(4)]
    nums.sort()
    if nums[-1] == 3 * nums[0] and nums[0]+nums[3] == nums[1]+nums[2]:
        print("YES")
    else:
        print("NO")


n = int(input())
x = []
for i in range(n):
    x.append(int(input()))
x = sorted(x)
a = []
good = False
if len(x) == 0:
    a = [1, 1, 3, 3]
    good = True
elif len(x) == 1:
    a = [x[0], 3 * x[0], 3 * x[0]]
    good = True
elif len(x) == 2:
    if 4 * x[0] - x[1] > 0:
        a = [4 * x[0] - x[1], 3 * x[0]]
        good = True
elif len(x) == 3:
    if x[2] == 4 * x[0] - x[1]:
        good = True
        a = [3 * x[0]]
    elif x[2] == 3 * x[0]:
        good = True
        a = [4 * x[0] - x[1]]
    elif x[2] % 3 == 0 and x[1] == 4 * (x[2] // 3) - x[0]:
        good = True
        a = [x[2] // 3]
elif len(x) == 4:
    if (x[2] == 4 * x[0] - x[1]) and (3 * x[0] == x[3]):
        good = True

if good:
    print("YES")
    for i in a:
        print(i)
else:
    print("NO")

'''
x1 + x2 + x3 + x4 = 4 * x
x1 + x4 = 2 * x
x4 - x1 = x

x1 = 0.5 * x
x2 + x3 = 2 * x
x4 = 1.5 * x
'''

import itertools


def check(*xs):

    return sum(xs) == 2 * sum(xs[1:3]) == 4 * (xs[-1] - xs[0]) and all([0 < x <= 10 ** 6 for x in xs]) and tuple(sorted(xs)) == xs


def solve(x1=None, x2=None, x3=None, x4=None):

    x = None
    if x1 is not None:

        x = 2 * x1
        if x4 is not None and 3 * x1 != x4:

            return

        x4 = 3 * x1

    if x4 is not None:

        if 2 * x4 % 3 != 0:

            return

        x = 2 * x4 // 3
        if x1 is not None and x // 2 != x1:

            return

        x1 = x // 2

    if x is None:

        if (x2 + x3) % 2 != 0:

            return

        x = (x2 + x3) // 2
        if x % 2 != 0:

            return

        x1 = x // 2
        x4 = 3 * x1

    else:

        if x2 is not None and x3 is None:

            x3 = 2 * x - x2

        elif x3 is not None and x2 is None:

            x2 = 2 * x - x3

    if check(x1, x2, x3, x4):

        return x1, x2, x3, x4

n = int(input())
if n == 0:

    print("YES")
    print(str.join("\n", list(map(str, (1, 1, 3, 3)))))

elif n == 1:

    a = int(input())
    print("YES")
    print(str.join("\n", [str(x * a) for x in (1, 3, 3)]))

elif n == 4:

    a = []
    for _ in range(n):

        a.append(int(input()))

    print("YES" if check(*sorted(a)) else "NO")

else:

    a = [None] * 4
    for i in range(n):

        a[i] = int(input())

    for comb in itertools.permutations(a, 4):

        nums = list(filter(bool, comb))
        if nums != sorted(nums):

            continue

        r = solve(*comb)
        if r is not None:

            print("YES")
            for x, xc in zip(r, comb):

                if xc is None:

                    print(x)

            return

    else:

        print("NO")


n=int(input())
a=sorted([int(input()) for _ in range(n)])
b=[]

if n==0: b=[1,1,3,3]
elif n==1: b=[a[0],a[0]*3,a[0]*3]
elif n==2: 
  x,y=a
  if x==y: b=[x*3,x*3]
  elif x*3>=y: b=[x*3,4*x-y]
elif n==3:
  x,y,z=a
  if x*3>=z and 4*x==y+z: b=[3*x]
  elif z%3==0 and (z+z//3)==x+y: b=[z//3]
  elif z==3*x: b=[4*x-y]
elif n==4:
  if a[3]!=a[0]*3 or a[0]*4!=a[1]+a[2]: b=[-1]

if len(b)+len(a)==4:
  print('YES')
  for x in b: print(x)
else:
  print('NO')

n=int(input())
a=sorted([int(input()) for _ in range(n)])
b=None

if n==0: 
  b=[1,1,3,3]
elif n==1: 
  x=a[0]
  b=[x,x*3,x*3]
elif n==2: 
  x,y=a
  if x==y: b=[x*3,x*3]
  elif x*3>=y: b=[x*3,x*4-y]
elif n==3:
  x,y,z=a
  if x*3>=z and x*4==y+z: b=[x*3]
  elif z+z/3==x+y: b=[z//3]
  elif z==x*3: b=[x*4-y]
elif n==4:
  x,y,z,v=a
  if v==x*3 and x*4==y+z: b=[]

if b != None:
  print('YES')
  for x in b: print(x)
else:
  print('NO')



n = int(input())

ar = [int(input()) for x in range(n)]

ar.sort()

def out(*g):
	g = list(g)
	g.sort()
	print("YES")
	for x in g:
		print(x)

def check(x1,x2,x3,x4):
	l = [x1,x2,x3,x4]
	s = sum(l) /4
	if s != int(s):
		return False
	l.sort()
	m = (l[1]+l[2])/2
	if m != int(m):
		return False
	d = l[3] - l[0]
	
	if not (s==m==d):
		return False
	return True

def _0():
	print('YES')
	print(1)
	print(1)
	print(3)
	print(3)

def _1():
	x = ar[0]
	print("YES")
#	print(x)
	print(x)
	print(3*x)
	print(3*x)

def _2():
	x,y = ar
	if x*3 < y:
		print("NO")
	else:
		
		print('YES')
#		print(x)
#		print(y)
		print(4*x-y)
		print(3*x)
def _3():
	x = ar[0]
	y = ar[1]
	z = ar[2]
	if x*3 < z:
		print("NO")
	else:
		print('YES')
#		print(x)
#		print(y)
#		print(z)
		print(3*x)

def _3():
	ar.sort()
	m = (max(ar)+10)*10
	for x in range(1, m):
		if check(x, *ar):
			out(x)
			return
			
	print("NO")


def _4():
	r = check(*ar)
	if r == False:
		print('NO')
	else:
		print("YES")
#		for x in ar:  print(x)


vars()['_' + str(n)]()

n=int(input())
if n==0:
    print('YES')
    print(1)
    print(1)
    print(3)
    print(3)
else:
    lis=[]
    for i in range(n):
        lis.append(int(input()))
    lis.sort()

    if n==1:
        print('YES')
        print(lis[0])
        print(3*lis[0])
        print(3*lis[0])

    if n==2:
        if lis[1]-lis[0]>2*lis[0]:
            print('NO')
        else:
            print('YES')
            print(4*lis[0]-lis[1])
            print(3*lis[0])
    if n==3:
        if lis[1]+lis[2]==4*lis[0] and max(lis[1],lis[2])<=3*lis[0]:
            print('YES')
            print(3*lis[0])
        elif lis[2]==3*lis[0]:
            print('YES')
            print(4*lis[0]-lis[1])
        elif (lis[0]+lis[1])*3==4*lis[2]:
            print('YES')
            print(int(lis[2]/3))
        else:
            print('NO')
    if n==4:
        if lis[3]==3*lis[0] and lis[1]+lis[2]==4*lis[0]:
            print('YES')
        else:
            print('NO')
        


n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
a=sorted(a)
if n==0:
    b=[1,1,3,3]
else:
    if n==1:
        b=[a[0],a[0]*3,a[0]*3]
    else:
        if n==2:
            if a[0]==a[1]:
                b=[a[1]*3,a[1]*3]
            else:
                if a[0]*3>=a[1]:
                    b=[a[0]*3,a[0]*4-a[1]]
                else:
                    b=None
        else:
            if n==4:
                if a[0]*3==a[3] and a[0]*4==a[1]+a[2]:
                    b=[]
                else:
                    b=None
            else:
                if a[0]*3>=a[2] and a[0]*4==a[1]+a[2]:
                    b=[a[0]*3]
                else:
                    if a[0]*3==a[2]:
                        b=[a[0]*4-a[1]]
                    else:
                        if a[2]*4/3==a[0]+a[1]:
                            b=[a[2]//3]
                        else:
                            b=None
if b==None:
    print("NO")
else:
    print("YES")
    for x in b:
        print(x)
                
                


n=int(input())
a=sorted([int(input()) for _ in range(n)])
b=None

if n==0: 
  b=[1,1,3,3]
elif n==1: 
  x=a[0]
  b=[x,x*3,x*3]
elif n==2: 
  x,y=a
  if x==y: b=[x*3,x*3]
  elif x*3>=y: b=[x*3,x*4-y]
elif n==3:
  x,y,z=a
  if x*3>=z and x*4==y+z: b=[x*3]
  elif z+z/3==x+y: b=[z//3]
  elif z==x*3: b=[x*4-y]
elif n==4:
  x,y,z,v=a
  if v==x*3 and x*4==y+z: b=[]

if b != None:
  print('YES')
  for x in b: print(x)
else:
  print('NO')



n = int(input())

ar = [int(input()) for x in range(n)]

ar.sort()

foobar = 1

def out(*g):
	g = list(g)
	g.sort()
	print("YES")
	for x in g:
		print(x)

def check(x1,x2,x3,x4):
	l = [x1,x2,x3,x4]
	s = sum(l) /4
	if s != int(s):
		return False
	l.sort()
	m = (l[1]+l[2])/2
	if m != int(m):
		return False
	d = l[3] - l[0]
	
	if not (s==m==d):
		return False
	return True

def _0():
	print('YES')
	print(1)
	print(1)
	print(3)
	print(3)

def _1():
	x = ar[0]
	print("YES")
#	print(x)
	print(x)
	print(3*x)
	print(3*x)

def _2():
	x,y = ar
	if x*3 < y:
		print("NO")
	else:
		
		print('YES')
#		print(x)
#		print(y)
		print(4*x-y)
		print(3*x)
def _3():
	x = ar[0]
	y = ar[1]
	z = ar[2]
	if x*3 < z:
		print("NO")
	else:
		print('YES')
#		print(x)
#		print(y)
#		print(z)
		print(3*x)

def _3():
	ar.sort()
	m = (max(ar)+10)*10
	for x in range(1, m):
		if check(x, *ar):
			out(x)
			return
			
	print("NO")


def _4():
	r = check(*ar)
	if r == False:
		print('NO')
	else:
		print("YES")
#		for x in ar:  print(x)


vars()['_' + str(n)]()

n = int(input())
t = sorted([int(input()) for i in range(n)])
s = None

if n == 0:
    s = [1, 1, 3, 3]
elif n == 1:
    a = t[0]
    s = [a, 3 * a, 3 * a]
elif n == 2:
    a, b = t
    if a * 3 >= b: s = [3 * a, 4 * a - b]
elif n == 3:
    a, b, c = t
    if 4 * a == b + c: s = [3 * a]
    elif 4 * c / 3 == a + b: s = [c // 3]
    elif c == 3 * a: s = [4 * a - b]
elif n == 4:
    a, b, c, d = t
    if d + a == 4 * a == b + c: s = []

if s != None:
    print('YES')
    for a in s: print(a)
else:
    print('NO')