Bob really likes playing with arrays of numbers. That's why for his birthday, his friends bought him a really interesting machine – an array beautifier. 

The array beautifier takes an array A consisting of N integers, and it outputs a new array B of length N that it constructed based on the array given to it. The array beautifier constructs the new array in the following way: it takes two numbers at different indices from the original array and writes their sum to the end of the new array. It does this step N times - resulting in an output array of length N. During this process, the machine can take the same index multiple times in different steps. 

Bob was very excited about the gift that his friends gave him, so he put his favorite array in the machine. However, when the machine finished, Bob was not happy with the resulting array. He misses his favorite array very much, and hopes to get it back. 

Given the array that the machine outputted, help Bob find an array that could be the original array that he put in the machine. Sometimes the machine makes mistakes, so it is possible that no appropriate input array exists for the array it has outputted. In such case, let Bob know that his array is forever lost.

Input

The first line contains one positive integer N (2 ≤ N ≤ 10^3) – the length of Bob's array.

The second line contains N integers B_1, B_2, ..., B_N (1 ≤ B_i ≤ 10^6) – the elements of the array the machine outputted.

Output

If an appropriate input array exists, print "YES", followed by the input array A_1, A_2, ..., A_N (-10^9 ≤ A_i ≤ 10^9) in the next line. Otherwise, print "NO".

Examples

Input


2
5 5


Output


YES
2 3


Input


3
1 2 3


Output


YES
0 1 2


Input


3
2 4 5


Output


NO


Input


4
1 3 5 7


Output


YES
6 -3 4 1

Source: codeforces | Difficulty: VERY_HARD
Tags: Complete search

Bit manipulation

Greedy algorithms


Solutions:
N = int(input())
odd = []
even = []
a = []
sum_array = {int(x) for x in input().split(' ')}
for x in sum_array:
	if x % 2 == 0:
		even.append(x)
	else:
		odd.append(x)

def fail():
	print('NO', end='')
	exit()

def out():
	print('YES')
	for x in a:
		print(x, end=' ')
	exit()

def count_set_bit(x):
	res = 0
	while x > 0:
		if x % 2 == 1:
			res += 1
		x //= 2
	return res

def find_cycle(max_size):
	vis = {}
	sum_circle = -1
	vt_circle = 0
	vt2_circle = 0
	for i in range(1 << max_size):
		if count_set_bit(i) == max_size // 2:
			sum = 0
			for j in range(max_size):
				if i >> j & 1:
					sum += sum_array[j]
			if sum in vis.keys():
				sum_circle = sum
				vt_circle = i
				vt2_circle = vis[sum]
				break
			vis[sum] = i
	if sum_circle == -1:
		fail()
	a.append(0)
	tmp = vt_circle & vt2_circle
	vt_circle ^= tmp
	vt2_circle ^= tmp
	left = []
	right = []
	for i in range(max_size):
		if vt_circle >> i & 1:
			left.append(sum_array[i])
	for i in range(max_size):
		if vt2_circle >> i & 1:
			right.append(sum_array[i])
	for i in range(len(left) - 1):
		a.append(left[i] - a[len(a) - 1])
		a.append(right[i] - a[len(a) - 1])
	a.append(left[len(left) - 1] - a[len(a) - 1])
	for i in range(N):
		if i >= max_size or (not vt_circle >> i & 1 and (not vt2_circle >> i & 1)):
			a.append(sum_array[i])
	out()
if len(sum_array) < N:
	for x in sum_array:
		a.append(x)
	for i in range(N - len(sum_array)):
		a.append(0)
		out()
if N == 2:
	fail()
if len(even) > 0:
	if len(even) == 2 and len(odd) == 1:
		fail()
	if len(even) > 2:
		a.append(int((even[2] + even[1] - even[0]) / 2))
		for x in sum_array:
			if x != even[0]:
				a.append(x - a[0])
	else:
		a.append(int((odd[1] + odd[0] - even[0]) / 2))
		for x in sum_array:
			if x != even[0]:
				a.append(x - a[0])
	out()
sum_array = list(sum_array)
find_cycle(min(N, 26))