n = int(input())
figure = list(map(int, input().split()))
figure1 = []
n_loop = n
p=0
for j in range(1,n):
  figure1.append(figure[0]^figure[j])
for k in range(2,n-1):
  if figure1[0]==figure[k]:
    number1 = figure[0]
    number2 = figure[1]
    number3 = figure[k]
    figure.remove(figure[0])
    figure.remove(figure[0])
    figure.remove(figure[k-2])
    figure1 = []
    n_loop -=3
    p+=1
    break
if p == 1:
  while(p ==n-2):
    for j in range(1,n_loop-p+1):
      now = number1^number2
      if(now==figure[j]):
        number1 = number2
        number2 = figure[j]
        p+=1
        figure.remove(figure[j])
        break
if(p!=(n-2)):
  print("No")

