Petr has just bought a new car. He's just arrived at the most known Petersburg's petrol station to refuel it when he suddenly discovered that the petrol tank is secured with a combination lock! The lock has a scale of 360 degrees and a pointer which initially points at zero:

<image>

Petr called his car dealer, who instructed him to rotate the lock's wheel exactly n times. The i-th rotation should be a_i degrees, either clockwise or counterclockwise, and after all n rotations the pointer should again point at zero.

This confused Petr a little bit as he isn't sure which rotations should be done clockwise and which should be done counterclockwise. As there are many possible ways of rotating the lock, help him and find out whether there exists at least one, such that after all n rotations the pointer will point at zero again.

Input

The first line contains one integer n (1 ≤ n ≤ 15) — the number of rotations.

Each of the following n lines contains one integer a_i (1 ≤ a_i ≤ 180) — the angle of the i-th rotation in degrees.

Output

If it is possible to do all the rotations so that the pointer will point at zero after all of them are performed, print a single word "YES". Otherwise, print "NO". Petr will probably buy a new car in this case.

You can print each letter in any case (upper or lower).

Examples

Input


3
10
20
30


Output


YES


Input


3
10
10
10


Output


NO


Input


3
120
120
120


Output


YES

Note

In the first example, we can achieve our goal by applying the first and the second rotation clockwise, and performing the third rotation counterclockwise.

In the second example, it's impossible to perform the rotations in order to make the pointer point at zero in the end.

In the third example, Petr can do all three rotations clockwise. In this case, the whole wheel will be rotated by 360 degrees clockwise and the pointer will point at zero again.
# A recursive Python3 program for 
# partition problem 

# A utility function that returns 
# true if there is a subset of 
# arr[] with sun equal to given sum 
def isSubsetSum (arr, n, sum): 
	# Base Cases 
	if sum == 0: 
		return True
	if n == 0 and sum != 0: 
		return False

	# If last element is greater than sum, then 
	# ignore it 
	if arr[n-1] > sum: 
		return isSubsetSum (arr, n-1, sum) 

	''' else, check if sum can be obtained by any of 
	the following 
	(a) including the last element 
	(b) excluding the last element'''
	
	return isSubsetSum (arr, n-1, sum) or isSubsetSum (arr, n-1, sum-arr[n-1]) 

# Returns true if arr[] can be partitioned in two 
# subsets of equal sum, otherwise false 
def findPartion (arr, n, j): 
	# Calculate sum of the elements in array 
	sum = 360*j
	for i in range(0, n): 
		sum += arr[i] 
	# If sum is odd, there cannot be two subsets 
	# with equal sum 
	if sum % 2 != 0: 
		return False

	# Find if there is subset with sum equal to 
	# half of total sum 
	return isSubsetSum (arr, n, sum // 2) 

n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))
flag=False    
for j in range(16):
    flag=flag or findPartion(a,n,j)
if(flag):print("YES")
else:print("NO")