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

N = N.split(" ")
Ni = []
for i in N:
    Ni.append(int(i))
ans = False
count = 0
for q in set(itertools.permutations(Ni,n)):
#     print(q)
    flg = True
    list_xor = []
    for i in range(len(q)):
        if len(q) > i+2:
            xor = (q[i] ^ q[i+2])
            tar = q[i+1]
        elif len(q) == i + 1:
            xor = (q[-2] ^ q[0])
            tar = q[-1]
        elif len(q) == i:
            xor = (q[-1] ^ q[1])
            tar = q[0]
            
#         print("{}, {}".format(xor, tar))
        
        if not xor == tar:
            flg = False
#             print(flg)
            break
            
    if flg == True:
        print("Yes")
        ans = True
        break
if not ans:
    print('No')