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.
n = int(input())
lst = []
for i in range(n):
	a = int(input())
	lst.append(a)
if n == 1:
	print("no")
elif n == 2:
	for a in range(2):
		for b in range(2):
			cnt = 0
			if a == 0:
				cnt -= lst[0]
			else:
				cnt += lst[0]
			if b == 0:
				cnt -= lst[1]
			else:
				cnt += lst[1]
		if cnt == 0 or cnt == 360:
			print("yes")
			exit()
		else:
			ans = "no"
	print(ans)
elif n == 3:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				cnt = 0
				if a == 0:
					cnt -= lst[0]
				else:
					cnt += lst[0]
				if b == 0:
					cnt -= lst[1]
				else:
					cnt += lst[1]
				if c == 0:
					cnt -= lst[2]
				else:
					cnt += lst[2]
			if cnt == 0 or cnt == 360:
				print("yes")
				exit()
			else:
				ans = "no"
	print(ans)
elif n == 4:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					cnt = 0
					if a == 0:
						cnt -= lst[0]
					else:
						cnt += lst[0]
					if b == 0:
						cnt -= lst[1]
					else:
						cnt += lst[1]
					if c == 0:
						cnt -= lst[2]
					else:
						cnt += lst[2]
					if d == 0:
						cnt -= lst[3]
					else:
						cnt += lst[3]
				if cnt == 0 or cnt == 360:
					print("yes")
					exit()
				else:
					ans = "no"
	print(ans)
elif n == 5:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						cnt = 0
						if a == 0:
							cnt -= lst[0]
						else:
							cnt += lst[0]
						if b == 0:
							cnt -= lst[1]
						else:
							cnt += lst[1]
						if c == 0:
							cnt -= lst[2]
						else:
							cnt += lst[2]
						if d == 0:
							cnt -= lst[3]
						else:
							cnt += lst[3]
						if e == 0:
							cnt -= lst[4]
						else:
							cnt += lst[4]
					if cnt == 0 or cnt == 360:
						print("yes")
						exit()
					else:
						ans = "no"
	print(ans)
elif n == 6:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							cnt = 0
							if a == 0:
								cnt -= lst[0]
							else:
								cnt += lst[0]
							if b == 0:
								cnt -= lst[1]
							else:
								cnt += lst[1]
							if c == 0:
								cnt -= lst[2]
							else:
								cnt += lst[2]
							if d == 0:
								cnt -= lst[3]
							else:
								cnt += lst[3]
							if e == 0:
								cnt -= lst[4]
							else:
								cnt += lst[4]
							if f == 0:
								cnt -= lst[5]
							else:
								cnt += lst[5]
						if cnt == 0 or cnt == 360:
							print("yes")
							exit()
						else:
							ans = "no"
	print(ans)
elif n == 7:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								cnt = 0
								if a == 0:
									cnt -= lst[0]
								else:
									cnt += lst[0]
								if b == 0:
									cnt -= lst[1]
								else:
									cnt += lst[1]
								if c == 0:
									cnt -= lst[2]
								else:
									cnt += lst[2]
								if d == 0:
									cnt -= lst[3]
								else:
									cnt += lst[3]
								if e == 0:
									cnt -= lst[4]
								else:
									cnt += lst[4]
								if f == 0:
									cnt -= lst[5]
								else:
									cnt += lst[5]
								if g == 0:
									cnt -= lst[6]
								else:
									cnt += lst[6]
							if cnt == 0 or cnt == 360:
								print("yes")
								exit()
							else:
								ans = "no"
	print(ans)
elif n == 8:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								for h in range(2):
									cnt = 0
									if a == 0:
										cnt -= lst[0]
									else:
										cnt += lst[0]
									if b == 0:
										cnt -= lst[1]
									else:
										cnt += lst[1]
									if c == 0:
										cnt -= lst[2]
									else:
										cnt += lst[2]
									if d == 0:
										cnt -= lst[3]
									else:
										cnt += lst[3]
									if e == 0:
										cnt -= lst[4]
									else:
										cnt += lst[4]
									if f == 0:
										cnt -= lst[5]
									else:
										cnt += lst[5]
									if g == 0:
										cnt -= lst[6]
									else:
										cnt += lst[6]
									if h == 0:
										cnt -= lst[7]
									else:
										cnt += lst[7]
								if cnt == 0 or cnt == 360:
									print("yes")
									exit()
								else:
									ans = "no"
	print(ans)
elif n == 9:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								for h in range(2):
									for i in range(2):
										cnt = 0
										if a == 0:
											cnt -= lst[0]
										else:
											cnt += lst[0]
										if b == 0:
											cnt -= lst[1]
										else:
											cnt += lst[1]
										if c == 0:
											cnt -= lst[2]
										else:
											cnt += lst[2]
										if d == 0:
											cnt -= lst[3]
										else:
											cnt += lst[3]
										if e == 0:
											cnt -= lst[4]
										else:
											cnt += lst[4]
										if f == 0:
											cnt -= lst[5]
										else:
											cnt += lst[5]
										if g == 0:
											cnt -= lst[6]
										else:
											cnt += lst[6]
										if h == 0:
											cnt -= lst[7]
										else:
											cnt += lst[7]
										if i == 0:
											cnt -= lst[8]
										else:
											cnt += lst[8]
									if cnt == 0 or cnt == 360:
										print("yes")
										exit()
									else:
										ans = "no"
	print(ans)
elif n == 10:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								for h in range(2):
									for i in range(2):
										for j in range(2):
											cnt = 0
											if a == 0:
												cnt -= lst[0]
											else:
												cnt += lst[0]
											if b == 0:
												cnt -= lst[1]
											else:
												cnt += lst[1]
											if c == 0:
												cnt -= lst[2]
											else:
												cnt += lst[2]
											if d == 0:
												cnt -= lst[3]
											else:
												cnt += lst[3]
											if e == 0:
												cnt -= lst[4]
											else:
												cnt += lst[4]
											if f == 0:
												cnt -= lst[5]
											else:
												cnt += lst[5]
											if g == 0:
												cnt -= lst[6]
											else:
												cnt += lst[6]
											if h == 0:
												cnt -= lst[7]
											else:
												cnt += lst[7]
											if i == 0:
												cnt -= lst[8]
											else:
												cnt += lst[8]
											if j == 0:
												cnt -= lst[9]
											else:
												cnt += lst[9]
										if cnt == 0 or cnt == 360:
											print("yes")
											exit()
										else:
											ans = "no"
	print(ans)
elif n == 11:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								for h in range(2):
									for i in range(2):
										for j in range(2):
											for k in range(2):
												cnt = 0
												if a == 0:
													cnt -= lst[0]
												else:
													cnt += lst[0]
												if b == 0:
													cnt -= lst[1]
												else:
													cnt += lst[1]
												if c == 0:
													cnt -= lst[2]
												else:
													cnt += lst[2]
												if d == 0:
													cnt -= lst[3]
												else:
													cnt += lst[3]
												if e == 0:
													cnt -= lst[4]
												else:
													cnt += lst[4]
												if f == 0:
													cnt -= lst[5]
												else:
													cnt += lst[5]
												if g == 0:
													cnt -= lst[6]
												else:
													cnt += lst[6]
												if h == 0:
													cnt -= lst[7]
												else:
													cnt += lst[7]
												if i == 0:
													cnt -= lst[8]
												else:
													cnt += lst[8]
												if j == 0:
													cnt -= lst[9]
												else:
													cnt += lst[9]
												if k == 0:
													cnt -= lst[10]
												else:
													cnt += lst[10]
											if cnt == 0 or cnt == 360:
												print("yes")
												exit()
											else:
												ans = "no"
	print(ans)
elif n == 12:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								for h in range(2):
									for i in range(2):
										for j in range(2):
											for k in range(2):
												for l in range(2):
													cnt = 0
													if a == 0:
														cnt -= lst[0]
													else:
														cnt += lst[0]
													if b == 0:
														cnt -= lst[1]
													else:
														cnt += lst[1]
													if c == 0:
														cnt -= lst[2]
													else:
														cnt += lst[2]
													if d == 0:
														cnt -= lst[3]
													else:
														cnt += lst[3]
													if e == 0:
														cnt -= lst[4]
													else:
														cnt += lst[4]
													if f == 0:
														cnt -= lst[5]
													else:
														cnt += lst[5]
													if g == 0:
														cnt -= lst[6]
													else:
														cnt += lst[6]
													if h == 0:
														cnt -= lst[7]
													else:
														cnt += lst[7]
													if i == 0:
														cnt -= lst[8]
													else:
														cnt += lst[8]
													if j == 0:
														cnt -= lst[9]
													else:
														cnt += lst[9]
													if k == 0:
														cnt -= lst[10]
													else:
														cnt += lst[10]
													if l == 0:
														cnt -= lst[11]
													else:
														cnt += lst[11]
												if cnt == 0 or cnt == 360:
													print("yes")
													exit()
												else:
													ans = "no"
	print(ans)
elif n == 13:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								for h in range(2):
									for i in range(2):
										for j in range(2):
											for k in range(2):
												for l in range(2):
													for m in range(2):
														cnt = 0
														if a == 0:
															cnt -= lst[0]
														else:
															cnt += lst[0]
														if b == 0:
															cnt -= lst[1]
														else:
															cnt += lst[1]
														if c == 0:
															cnt -= lst[2]
														else:
															cnt += lst[2]
														if d == 0:
															cnt -= lst[3]
														else:
															cnt += lst[3]
														if e == 0:
															cnt -= lst[4]
														else:
															cnt += lst[4]
														if f == 0:
															cnt -= lst[5]
														else:
															cnt += lst[5]
														if g == 0:
															cnt -= lst[6]
														else:
															cnt += lst[6]
														if h == 0:
															cnt -= lst[7]
														else:
															cnt += lst[7]
														if i == 0:
															cnt -= lst[8]
														else:
															cnt += lst[8]
														if j == 0:
															cnt -= lst[9]
														else:
															cnt += lst[9]
														if k == 0:
															cnt -= lst[10]
														else:
															cnt += lst[10]
														if l == 0:
															cnt -= lst[11]
														else:
															cnt += lst[11]
														if m == 0:
															cnt -= lst[12]
														else:
															cnt += lst[12]
													if cnt == 0 or cnt == 360:
														print("yes")
														exit()
													else:
														ans = "no"
	print(ans)
elif n == 14:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								for h in range(2):
									for i in range(2):
										for j in range(2):
											for k in range(2):
												for l in range(2):
													for m in range(2):
														for n in range(2):
															cnt = 0
															if a == 0:
																cnt -= lst[0]
															else:
																cnt += lst[0]
															if b == 0:
																cnt -= lst[1]
															else:
																cnt += lst[1]
															if c == 0:
																cnt -= lst[2]
															else:
																cnt += lst[2]
															if d == 0:
																cnt -= lst[3]
															else:
																cnt += lst[3]
															if e == 0:
																cnt -= lst[4]
															else:
																cnt += lst[4]
															if f == 0:
																cnt -= lst[5]
															else:
																cnt += lst[5]
															if g == 0:
																cnt -= lst[6]
															else:
																cnt += lst[6]
															if h == 0:
																cnt -= lst[7]
															else:
																cnt += lst[7]
															if i == 0:
																cnt -= lst[8]
															else:
																cnt += lst[8]
															if j == 0:
																cnt -= lst[9]
															else:
																cnt += lst[9]
															if k == 0:
																cnt -= lst[10]
															else:
																cnt += lst[10]
															if l == 0:
																cnt -= lst[11]
															else:
																cnt += lst[11]
															if m == 0:
																cnt -= lst[12]
															else:
																cnt += lst[12]
															if n == 0:
																cnt -= lst[13]
															else:
																cnt += lst[13]
														if cnt == 0 or cnt == 360:
															print("yes")
															exit()
														else:
															ans = "no"
	print(ans)
elif n == 15:
	for a in range(2):
		for b in range(2):
			for c in range(2):
				for d in range(2):
					for e in range(2):
						for f in range(2):
							for g in range(2):
								for h in range(2):
									for i in range(2):
										for j in range(2):
											for k in range(2):
												for l in range(2):
													for m in range(2):
														for n in range(2):
															for o in range(2):
																cnt = 0
																if a == 0:
																	cnt -= lst[0]
																else:
																	cnt += lst[0]
																if b == 0:
																	cnt -= lst[1]
																else:
																	cnt += lst[1]
																if c == 0:
																	cnt -= lst[2]
																else:
																	cnt += lst[2]
																if d == 0:
																	cnt -= lst[3]
																else:
																	cnt += lst[3]
																if e == 0:
																	cnt -= lst[4]
																else:
																	cnt += lst[4]
																if f == 0:
																	cnt -= lst[5]
																else:
																	cnt += lst[5]
																if g == 0:
																	cnt -= lst[6]
																else:
																	cnt += lst[6]
																if h == 0:
																	cnt -= lst[7]
																else:
																	cnt += lst[7]
																if i == 0:
																	cnt -= lst[8]
																else:
																	cnt += lst[8]
																if j == 0:
																	cnt -= lst[9]
																else:
																	cnt += lst[9]
																if k == 0:
																	cnt -= lst[10]
																else:
																	cnt += lst[10]
																if l == 0:
																	cnt -= lst[11]
																else:
																	cnt += lst[11]
																if m == 0:
																	cnt -= lst[12]
																else:
																	cnt += lst[12]
																if n == 0:
																	cnt -= lst[13]
																else:
																	cnt += lst[13]
															if cnt == 0 or cnt == 360:
																print("yes")
																exit()
															else:
																ans = "no"
	print(ans)