#!/usr/bin/env python
 
import sys
 
n= int(sys.stdin.readline())
ai  = [ int(x) for x in sys.stdin.readline().split() ]

mm = dict()
for i,x in enumerate(ai):
    mm[x]= mm.get(x,0) + 1
#
ans= "No"
even= list(filter(lambda i:i % 2 ==0, ai))
odd = len(list(filter(lambda i:i % 2 ==1, ai)))
f= ai.index(max(even))
ll = len(bin(ai[f]))-2
second= []
for i in range(n):
    if i==f: continue
    a= ai[i]
    if len(bin(a))-2!=ll: continue
    if odd:
        if a%2==1: second.append(a)
    else:
        if a%2==0: second.append(a)
#
for s in second:
    tmp= [ai[f],s]
    cnt= { ai[f]:1 }
    cnt[s]= cnt.get(s,0)+1
    for _ in range(2,n):
        nn = tmp[-1] ^ tmp[-2]
        cnt[nn]= cnt.get(nn,0) + 1
        if cnt[nn]>mm.get(nn,0): break
        tmp.append(nn)
    #
    if len(tmp)==n:
        x,y,z,w = tmp[-2],tmp[-1],tmp[0],tmp[1]
        if x==y^z and y==z^w:
            ans="Yes"
            break
#
print( ans )
