#!/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,[])
    mm[x].append( i )
#
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(i)
    else:
        if a%2==0: second.append(i)
#
for s in second:
    tmp= [f,s]
    for _ in range(2,n):
        nn = ai[tmp[-1]] ^ ai[tmp[-2]]
        i= -1
        for ii in mm.get(nn,[]):
            if not ii in tmp:
                i= ii
                break
        #
        if i>=0: tmp.append(i)
        else: break
    #
    if len(tmp)==n:
        x,y,z,w = ai[tmp[-2]],ai[tmp[-1]],ai[tmp[0]],ai[tmp[1]]
        if x==y^z and y==z^w:
            ans="Yes"
            break
#
print( ans )
