#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using pi = pair<int,int>;
constexpr ll mod = 1000000007;
void pPRINTl(ostream& ost) { ost << endl; }
template <class T>void pPRINTL(ostream& ost,T t){ost<<t<<endl;}
template <class T, class... U>void pPRINTl(ostream& ost, T t, U... u) {ost << t << " ";pPRINTl(ost, u...);}
//template <class... T>void PRINTl(T... t) { pPRINTl(cout, t...); }
#define PRINTl //
void pPRINT(ostream& ost) {}
template <class T>void pPRINT(ostream& ost, T t){ost<<t;}
template <class T, class... U>void pPRINT(ostream& ost, T t, U... u) {ost << t << " ";pPRINT(ost, u...);}
template <class... T>void PRINT(T... t) { pPRINT(cout, t...); }

  bool func(ll l,ll s,ll n,ll *a,ll *p){
    ll r= a[l]^a[s];
    p[s]=p[l]+1;
    //if end
    if(p[s]==n-1){
      PRINTl(l,s,":",a[l],a[s],r,"i",0,"a[i]",a[0],"p[i]",p[0]);
      if(r==a[0]){
        PRINTl("searching end");
        return true;
      }
      else{
        p[s]=-1;
        return false;
      }
    }
    REP(i,n){
      PRINTl(l,s,":",a[l],a[s],r,"i",i,"a[i]",a[i],"p[i]",p[i]);
      if(i!=l&&i!=n&&a[i]==r&&p[i]<0){
        PRINTl(a[l],a[s],a[i],"match");
        if(func(s,i,n,a,p))return true;
      }
    }
    p[s]=-1;
    return false;
  }

int main(){
  
  ll n;
  cin>>n;
  ll a[n];
  
  ll d=0;
  REP(i,n){
    cin>>a[i];
    d^=a[i];
  }
  if(d!=0){
    PRINT("No");return 0;
  }
  ll p[n];REP(i,n)p[i]=-1;
  /*
  function<bool(ll,ll)> func = [&](ll l,ll s) -> bool{
    ll r= a[l]^a[s];
    p[s]=p[l]+1;
    //if end
    if(p[s]==n-1){
      PRINTl(l,s,":",a[l],a[s],r,"i",0,"a[i]",a[0],"p[i]",p[0]);
      if(r==a[0]){
        PRINTl("searching end");
        return true;
      }
      else{
        p[s]=-1;
        return false;
      }
    }
    REP(i,n){
      PRINTl(l,s,":",a[l],a[s],r,"i",i,"a[i]",a[i],"p[i]",p[i]);
      if(i!=l&&i!=n&&a[i]==r&&p[i]<0){
        PRINTl(a[l],a[s],a[i],"match");
        if(func(s,i))return true;
      }
    }
    p[s]=-1;
    return false;
  };
  */

  bool f=false;
  p[0]=0;
  FOR(i,1,n/2+1){
    f = func(0,i,n,a,p);
    if(f)break;
  }
  
  if(f)PRINT("Yes");
  else PRINT("No");
  
  
  return 0;
}