import numpy as np
n = int(input())
a = list(map(int,input().split()))
npa = np.array(a)
npx = npa^(npa.reshape(n,1))
p = list(npx[np.triu_indices(n,k=1)])
for i in a:
  if i in p:
    p.remove(i)
    continue
  else:
    print("No")
    quit()
print("Yes")