from itertools import combinations

N = int(input())
*A, = map(int, input().split())
A = set(A)
if len(A) == 3:
    for a, b, c in combinations(A, 3):
        if a ^ c == b and b ^ a == c: print('Yes'); break;
    else: print('No')
elif len(A) <= 2: print('Yes' if 0 in A else 'No')
else:
    print('No')