N=int(input())
a= list(map(int, input().split()))
b=[None]*N
b[0]=a[0]
A=0
for i in range(1,N-1):
  c=a
  c[0]=0
  b[1]=a[i]
  c[i]=0
  for j in range(2,N):
    b[j]=b[j-1]^b[j-2]
    for k in range(1,N):
      if b[j]==c[k]:
        c[k]=0
        break
    else:
      break
    A=1
if A==1:
  print("Yes")
else:
  print("No")
