import collections
N=int(input())
a=list(map(int,input().split()))
def judge(a):
    if sum(a)==0:
        return True
    else:
        a=dict(collections.Counter(a))
        a0=list(a.keys())[0]
        a1=list(a.keys())[1]
        a2=list(a.keys())[2]
        if a0^a1==a2:
            return True
    return False

if judge(a):
    print("Yes")
else:
    print("No")