import itertools
n = int(input())
N = input()

N = N.split(" ")
Ni = []
for i in N:
    Ni.append(int(i))

count = 0
for q in set(itertools.permutations(Ni,n)):
    list_xor = []
    for i in range(len(q)):
        if len(q) > i+1:
            xor = (q[i] ^ q[i+1])
        else:
            xor = (q[0] ^ q[i])
        list_xor.append(xor)

        flg = "No"
    for i in list(itertools.permutations(q)):
        if i == tuple(list_xor):
            flg = 'Yes'
            break
print(flg)