import itertools
n = int(input())
a = [int(i) for i in input().split()]

p = list(itertools.permutations(a,len(a)))
y = 0
for l in p:
	c = 0
	for i in range(len(l)-1):
		if l[i] != int(bin(l[i-1]^l[i+1]),0):
			c=1
			break
	if c==0:
		if l[-1] == int(bin(l[0]^l[-2]),0):
			y=1
			break
			
if y==1:
	print("Yes")
else:
	print("No")