N=int(input())
a=list(map(int,input().split()))
A={}
for h in range(N):
    if a[h] in A:
        A[a[h]]+=1
    else:
        A[a[h]]=1

ans="No"
for i in range(1,N):
    temp=A.copy
    P=[a[0],a[i]]
    for j in range(2,N):
        x=P[-1]^P[-2]
        if x in A and A[x]>0:
            P.append(x)
            A[x]-=1
        else:
            break
    if len(P)==N and P[-1]^P[-2]==P[0] and P[-1]^P[0]==P[1]:
        ans="Yes"
        break

print(ans)