n = int(input())
a = list(map(int,input().split()))

a = sorted(a,reverse=True)

for ai in a[1:]:
  gen = [a[0]]
  gen.append(ai)
  for j in range(2,n):   
    gen.append(gen[j-2]^gen[j-1])

if (set(gen)==set(a)):
  print('Yes')
else:
  print('No')    