import itertools

boushi_num = int(input())
boushi_No = list(map(int,input().split()))
flag = 0

jyun = list(itertools.permutations(boushi_No, boushi_num))
jyun_num = len(jyun)

for v in jyun:
  for i in range(jyun_num):
    i_a = i+2
    i_b = i+1
    if i_a >boushi_num -1:
      i_a = i_a - boushi_num
    if i_b >boushi_num -1:
      i_b = i_b - boushi_num
            
    if v[i]^v[i_a] != v[i_b]:
      break
    else:
      None
            
    if i == boushi_num - 1:
      flag = 1
                
  if flag == 1:
    print('Yes')
    break

if flag == 0:
  print('No')