import math
 
N = int(input())
a = list(map(int, input().split(" ")))
 
def XOR(x):
	n = x.bit_length()
	count = 0
	while n > 0:
		count = count + x // int(math.pow(2,n-1))
		if x // int(math.pow(2,n-1)) == 1:
			x = x - int(math.pow(2,n-1))
		n = n - 1
	return count % 2
 
c_odd = 0
c_eve = 0
for i in range(N):
	if XOR(a[i])==1:
		c_odd = c_odd + 1
	else:
		c_eve = c_eve + 1
 
if N % 2 == 1:
	if c_odd == c_eve + 1 or c_odd == 0:
		print('Yes')
	else:
		print('No')
else:
	if c_odd == c_eve or c_odd == 0:
		print('Yes')
	else:
		print('No')
 