n=int(input())
a=list(map(int,input().split()))
b=[]
l=0
for i in range(n-1):
  for j in range(n-1-i):
    b.append(a[i]^a[j+i+1])
for k in range(n):
  c=b[k]
  if c in a:
    l+=1
if l==n:
  print("Yes")
else:
  print("No")