#!/usr/bin/env python3
from collections import Counter

n = int(input())
*a, = map(int, input().split())
c = Counter(a)
b = 0
for i in c.keys():
    b ^= i
if sum(a) == 0 or (b == 0 and all(i * 3 == n for i in c.values())):
    print("Yes")
else:
    print("No")
