def bit_count(n): re=0 while n>0: if n&1: re+=1 n>>=1 return re N=int(input()) A=list(map(int,input().split())) ans=0 for i in range(N): ans^=A[i] if ans==0: left=0 for i in range(N): left|=A[i] if N>bit_count(left)+1: print('Yes') else: print('No') else: print('No')