import sys
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):
    if a[i]^a[j+i+1] in a:
      l+=1
      if l==n:
        print("Yes")
        exit()
else:
  print("No")