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

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