from collections import deque
N, *a = map(int, open(0).read().split())

a.sort()
q = deque()
for i, x in enumerate(a):
    if i % 2 == 0:
        q.append(x)
    else:
        q.appendleft(x)
        
if all(q[i] == q[i - 1]^q[(i + 1) % N] for i in range(N)):
    print('Yes')
else:
    print('No')
