n = int(input())
figure = list(map(int, input().split()))
cnt=0#最大n-2
loop_n = n
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
        number1=figure[j]
        number2=figure[k]
        lastnumber=figure[i]
        figure.remove(figure[i])
        figure.remove(figure[j-1])
        figure.remove(figure[k-2])
        loop_n-=3
        i, j, k=n,n,n
if n != loop_n:  
  for i in range(0,loop_n):
    now = number1^number2
    for j in range(0,loop_n):
      if now == figure[j]:
        cnt+=1
        loop_n -=1
        number1, number2 = numbwe2, figure[j]
        figure.remove(j)
        i, j=-1
if(n-2)==cnt:
  print("Yes")
else:
  print("No")