import itertools

n = int(input())
a = input().split()
a = [int(s) for s in a]

#a_2 = [bin(i) for i in a]
#a_3 = ['{0:031d}'.format(i, 'b') for i in a]
#a_4 = [list(s) for s in a_3] # 各入力、2進数、str、文字ごとにリスト化

test = list(itertools.permutations(a))
#print(test)
flag = 0

for i in range(len(test)):
  if((test[i][-2]^test[i][0]==test[i][-1]) and (test[i][-1]^test[i][1]==test[i][0])):
    for j in range(n-2):
#      print("ここ")
#      print(test[i][j]^test[i][j+2])
#      print(test[i][j+1])
      if test[i][j]^test[i][j+2] != test[i][j+1]:
#        print("これ")
        break
      if j == (n-3):
        flag = 1

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