from collections import Counter
n = int(input())
A = list(map(int, input().split()))
a = A[0]
for i in range(1, n):
  a ^= A[i]
c = Counter(A)
if a == 0 and len(c) == 3 and all(v == n // 3 for v in c.values()):
  print('Yes')
else:
  print('No')