import itertools

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

def check(x):
  print(x)
  res = True
  for i in range(len(x)):
    _prev = i-1 if i>0 else len(x)-1
    _next = i+1 if i<len(x)-1 else 0
    res &= x[_prev]^x[_next] == x[i]
  return res

for e in itertools.permutations(a[1:]):
  if check(list(e)+[a[0]]):
    print('Yes')
    break
else:
  print('No')