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

A.sort()

res = True
for i in range(len(A)):
    j = (i+1) % len(A)
    k = (i+2) % len(A)
    a0 = A[i]
    a1 = A[j]
    a2 = A[k]
    if a1 != a0 ^ a2:
        res = False

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