import copy

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