import itertools
N = int(input()) 
i = list(map(int, input().split()))
flag = 0
for v in itertools.permutations(i):
  vl = list(v)
  vl.append(vl[0])
  vl.insert(0, vl[-2])
  cnt = 0
  for j in range(len(vl)-2):
    if vl[j] ^ vl[j+2] == vl[j+1]:
      cnt += 1
      continue
    else:
      break
  if cnt == (len(vl) -2):
    print('Yes')
    flag = 1
    break
if flag == 0: print('No')