from collections import Counter

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

c = Counter(a)
k = list(c.keys())
v = list(c.values())
if len(c) == 3 and k[0] ^ k[1] == k[2] and v[0] == v[1] == v[2]:
    able = True
else:
    able = False
print('Yes' if able else 'No')
