n=int(input()) a=list(map(int,input().split())) if n>16: for i in range(16): for j in range(i,n): if (a[j]>>i)&1: a[i],a[j]=a[j],a[i] if (a[i]>>i)&1: for j in range(i+1,n): if (a[j]>>i)&1: a[j]^=a[i] f=1 for i in range(n): f&=a[i].bit_count()<=1 else: f=0 for i in range(1,(1<>j)&1: b^=a[j] else: c^=a[j] if b==0 and c==0: f=1 if f: print("Yes") else: print("No")