
import numpy as np

# %%
N = int(input())
a = list(map(lambda x: int(x), input().split(' ')))
# N = 3
# a = [1, 2, 3]


mat = np.zeros([len(a), len(a)])
mat[:, :] = np.nan

for i in range(len(a)):
    for j in range(i+1, len(a)):
        mat[i, j] = a[i] ^ a[j]

flg = True
for _a in a:
    if np.sum(mat == _a).sum() == 0:
        print('No')
        flg = False
        break

if flg:
    print('Yes')
