N=int(input())
a=list(map(int, input().split()))
base=a[0]
s=set(a) # 検索用
from collections import Counter
d=Counter(a) # 重複用
for i in range(1, N):
  tmp=a[0]^a[i]
  if tmp in s:
    if d[tmp]>0:
      d[tmp]-=1
    else:
      print("No")
      exit()
  else:
    print("No")
    exit()
print("Yes")