# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int,input().split()))
P = L[:]
var = 0


for i1 in range(N):
  for i2 in range(N):
    if L[i1]^L[i2] == L[var]:
      P = P.remove(P[var])
      var = i2
  continue
if P is None:
  print("Yes")
else:
  print("No")