import itertools
N = int(input())
S = [i for i in map(int, input().split())]


for i in itertools.permutations(S):
    pool = []
    for j in range(N):
        if j != N-1:
            if i[j] != i[j-1]^i[j+1]:
                pool.append(1)
                continue
            else:
                pool.append(0)    
        elif j == N-1:
            if i[j] != i[j-1]^i[0]:
                pool.append(1)
                continue
            else:
                pool.append(0)
    if sum(pool) == 0:
        print('Yes')
        break
if sum(pool)!= 0:
    print('No')