n = int(input())-1
li = list(map(int,input().split()))
t = li[0]
del li[0]
for b in li:
  a = t
  for j in range(n):
    if j == n-2 and a^b in li:
      print("Yes")
      exit()
    if a^b in li:
      a,b=b,a^b
    else:
      break
print("No")