from functools import reduce
from operator import xor
from collections import Counter
N=int(input())
A=list(map(int, input().split()))
C=Counter(A)
if len(C)==1:
    print("Yes")
else:
    print("YNeos"[not(len(C)==3 and reduce(xor, C.keys())==0)::2])