n=int(input()) L=[int(input()) for _ in range(1<>bit&1: if L[i]>>bit&1: cnt+=1 cnt2+=1 else: if L[i]>>bit&1: exit(print("No")) if cnt not in [0,cnt2]: exit(print("No")) print("Yes")