n=int(input())
setting=set(map(int,input().split()))
ans=0
sign=0
l=len(setting)
for i in setting:
    ans=ans^i
if n==3 or l<n:
    if ans==0:
        print("Yes")
    else :
        print("No")
else:
    setting=list(setting)
    for i in range(l-1):
        for j in range(l-i-1):
            if ans==(setting[i]^setting[j]):
                print("Yes")
                sign=1
                break
        if sign==1:
            break
    if sign==0:
        print("No")