import itertools
import collections

n = int(input())
A = list(map(int,input().split()))
ans = "No"
for x in itertools.permutations(A,2):
    dl = collections.Counter(A)
    L = n-1
    y = list(x)
    dl[y[1]] -= 1
    while(L):
        tmp = y[0]^y[1]
        if dl[tmp] <= 0:
            break
        dl[tmp]-=1
        y[0] = y[1]
        y[1] = tmp
        L-=1
        if L == 0:
            ans = "Yes"
    if ans =="Yes":
        break
print(ans)
