n=int(input()) a=list(map(int,input().split())) s=a[0] for i in range(1,n): s^=a[i] if s!=0: print('No') exit() dp=[[set(),a[0]] for _ in range(n)] for i in range(n-1): keep=set() keep.add(dp[i][1]) for j in dp[i][0]: keep.add(j) keep.add(j^a[i+1]) keep.add(a[i+1]) dp[i+1][0]=keep dp[i+1][1]=dp[i][1]^a[i+1] if 0 in dp[-1][0]: print('Yes') else: print('No')