N=int(input())
a=list(map(int,input().split()))
if len(a)==3:
    if a[0]^a[1]==a[2]:
        print("Yes")
    else:
        print("No")
else:
    if max(a)==0:
        print("Yes")
    else:
        print("No")