import itertools

n = int(input())
ais = list(map(int, input().split()))
yes = 1
all_ai = list(itertools.permutations(ais, len(ais)))

for ai in all_ai:
  for i in range(n):
    if i == 0:
      if (ai[1] ^ ai[n-1]) != ai[0]:
        yes = 0
    elif i == n-1:
      if (ai[0] ^ ai[n-2]) != ai[n-1]:
        yes = 0
    else:
      if (ai[i-1] ^ ai[i+1]) != ai[i]:
        yes = 0
if yes == 0:
  print('No')
else:
  print('yes')