def f(t,T):
    if t in T:
        return T[t]
    else:
        return 0

from copy import copy

N=int(input())
A=list(map(int,input().split()))

T={}
for a in A[1:]:
    if a in T:
        T[a]+=1
    else:
        T[a]=1

F=True
for i in range(1,N):
    a,b=A[0],A[i]
    X=[a,b]+[0]*(N-2)

    U=copy(T)
    U[b]-=1

    G=True
    for k in range(N-2):
        c=a^b
        if f(c,U)>0:
            U[c]-=1
            X[k+2]=c
            a,b=b,c
        else:
            G=False
            break

    if G and X[-2]^X[-1]==X[0] and X[-1]^X[0]==X[1]:
        print("Yes")
        exit()

print("No")