N = int(input())
aa = list(map(int, input().split()))
b = list(map(bin, a))
 
ok=False
a0=aa[0]
for i in aa[1:]:
    a = aa.copy()
    used = [False]*N
    
    tmp=a[0]
    used[0] = True
    a[0]=-1
    
    tmp2=i
    used[a.index(i)]=True
    used[a.index(i)]=-1
    
    for j in range(N-1):
        tmp3=tmp^tmp2
        if j==N-2 and tmp3==a0:
            ok=True
            break
        if not (tmp3 in a):
            break
        tmp3_idx = a.index(tmp3)
        if used[tmp3_idx]==True:
            break
        else:
            used[tmp3_idx]=True
            a[tmp3_idx]=-1
            tmp=tmp2
            tmp2=tmp3
if ok:
    print("Yes")
else:
    print("No")