import itertools
N = int(input())
a = list(map(int, input().split()))
first = a.pop(0)
aa = list(itertools.permutations(a))

answer = "No"
for i in range(len(aa)):
  alist = list(aa[i])
  alist.insert(0, first)
  for j in range(len(alist) - 1):
    if alist[j] == (alist[j - 1] ^ alist[j + 1]):
      answer = "Yes"
      break
  if answer == "Yes":
    break
    
print(answer)
