from collections import Counter

n = int(input())
a = Counter(map(int, input().split()))

cnt = 0
for i in a:
    cnt ^= i

if n % 3 == 0 and cnt == 0:
    if all(a[i] % (n // 3) == 0 for i in a):
        print('Yes')
        exit()
print('No')
