#!/usr/bin/env python

import sys

n= int(sys.stdin.readline())
ai  = []
even= []
odd = []
lmax= 0
for i,x in enumerate( sys.stdin.readline().split() ):
    a = int(x)
    ai.append(a)
    #
    if a%2==0: even.append(i)
    else: odd.append(i)
    #
    tmp= len(bin(a))-2
    if tmp>lmax: lmax= tmp
#
ne= len(even)
no= len(odd)
if no!=0 and no!=2*ne:
    print( "No" )
    exit()
#
first=None
for e in even:
    ee = ai[e]
    if len(bin(ee))==lmax+2:
        first= ee
        break
#
if first==None:
    print( "No" )
    exit()
#
second=[]
if no>0:
    for o in odd:
        oo = ai[o]
        if len(bin(oo))==lmax+2: second.append(oo)
else:
    for e in even:
        ee = ai[e]
        if len(bin(ee))==lmax+2: second.append(ee)
#
if len(second)==0:
    print( "No" )
    exit()
#
ans= "No"
for s in second:
    tmp= [first,s]
    for i in range(2,n):
        nn = tmp[-1] ^ tmp[-2]
        if nn in ai and not nn in tmp:
            tmp.append(nn)
        else:
            break
    #
    if len(tmp)==n and tmp[-2]==tmp[-1]^tmp[0] and tmp[-1]==tmp[0]^tmp[1]:
        ans="Yes"
        break
#
print( ans )
