n=int(input()) L=list(map(int,input().split())) tmp=0 for e in L: tmp^=e if tmp!=0:exit(print("No")) M=max(L)+1 dp=[0]*(M) dp[0]=1 for e in L[:-1]: if dp[e]:exit(print("Yes")) for i in range(M)[::-1]: if dp[i] and i^e