N = int(input())
a = list(map(lambda x: int(x), input().split(' ')))

# %%
# N = 4
# a = [1, 2, 4, 8] 

# N = 3
# a = [1, 2, 3] 

def func(flg, bef, nokori):
    xor = [bef^x for x in nokori]
    curr_flg = []
    for j, curr in enumerate(nokori):
        if curr in xor:
            curr_flg.append(True)
            func(flg, curr, nokori[0:j]+nokori[j+1:])
        curr_flg.append(False)
        # print(curr_flg)
    flg = True in curr_flg

flg = True

for i, bef in enumerate(a):
    nokori = a[0:i] + a[i+1:]
    func(flg, bef, nokori)

if flg:
    print('Yes')
else:
    print('No')

