import itertools
N = int(input())
arr = list(map(int, input().split()))
for i in itertools.permutations(arr):
    flg = True
    for k in range(N):
        if i[k-2] ^ i[k] != i[k-1]:
            flg = False
            break
    if flg:
        print('Yes')
        exit()
print('No')