# A - XOR Circle
import itertools
import sys

N = int(input())
seq = list(map(int, input().split()))

pattern = list(itertools.permutations(seq))
for i in range(0, N):
    for j in range(0, len(pattern[i])):
        if (pattern[i][j-2] ^ pattern[i][j]) != pattern[i][j-1]:
            print('No')
            sys.exit(0)
print('Yes')