import sys
inputs = sys.stdin.readlines()

N = int(inputs[0])
a_list = list(map(int, inputs[1].split()))

from itertools import permutations
if N == 3:
    for pattern in permutations(a_list, N):
        f = True
        for i in range(0, N-1):
            f = f and (pattern[i] == pattern[i-1] ^ pattern[i+1])
        f = f and (pattern[N-1] == pattern[N-2] ^ pattern[0])
        if f:
            break
else:
    f = sum(a_list) == 0

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