import itertools

input()
seq = list(map(int, input().split(' ')))
l = len(seq)
flg = False
for ls in itertools.permutations(seq):
  for i in range(l):
    if ls[i-2] ^ ls[i] != ls[i-1]:
      break
  if i == l-1:
    flg = True
    break

print('Yes' if flg else 'No')