n=int(input())
a=sorted(list(map(int,input().split())))
ans=[]
for i in range(n):
    for j in range(n):
        if i<j:
            c=a[i]^a[j]
            if a.count(c)>0:
                ans.append(c)
            else:break
ans=sorted(ans)
print("Yes" if ans==a else "No")