n = int(input())
figure = list(map(int, input().split()))
cnt=0#最大n-2
for i in range(0,n-2):
  for j in range(i+1,n-1):
    for k in range(j+1,n):
      if figure[i] ^ figure[j] == figure[k]:
        cnt+=1
        figure[i], figure[j] = figure[j], figure[k]
        figure.remove(figure[k])
        i = 0
        j = 1
        k = 2
if(n-2)==cnt:
  print("Yes")
else:
  print("No")