import copy 

n = int(input())
a = list(map(int,input().split()))
a1 = a[0]
flag = False
for i in range(1,n):
    t = copy.deepcopy(a[1:])
    a2 = a[i]
    t.remove(a2)
    nxt = a1 ^ a2
    while len(t) != 0:
        if nxt in t:
            t.remove(nxt)
            a1 = a2
            a2 = nxt
            nxt = a1 ^ a2
        else:
            break
    else:
        if nxt == a[0]:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

 
