#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <utility>
#include <string>
#include <stack>
#include <regex>
#include <numeric>
#include <queue>
#include <set>

#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()

using namespace std;

typedef long long ll;

int main(int argc, char const *argv[])
{
  ll n;
  cin >> n;
  vector<ll> a(n);
  REP(i, n)
  cin >> a[i];
  multiset<ll> s(ALL(a));
  map<ll, ll> m;
  for (ll i = 0; i < a.size(); i++)
  {
    if (m.find(a[i]) == m.end())
    {
      m[a[i]] = 1;
    }
    else
    {
      m[a[i]]++;
    }
  }
  ll tmp = a[0];
  ll c = 0;
  ll tmpc = -1;
  for (ll i = 1; i < a.size(); i++)
  {
    ll b = a[i];
    //auto it = s.find(tmp ^ b);
    ll num = m[tmp ^ b];
    if (num != 0)
    {
      //ll cnt = s.erase(tmp);
      m[tmp]--;
      //s.erase(b);
      m[b]--;
      //cnt = s.erase(tmp ^ b);
      //m[tmp ^ b]--;
      tmpc = tmp ^ b;
      c = tmp;
      tmp = b;
      break;
    }
  }
  if (tmpc == -1)
  {
    cout << "No" << endl;
    return 0;
  }
  for (ll i = 0; i < a.size() - 2; i++)
  {
    //auto it = s.find(tmp ^ c);
    ll num = m[tmp ^ c];
    if (num == 0)
    {
      cout << "No" << endl;
      return 0;
    }
    else
    {
      //ll cnt = s.erase(tmp ^ c);
      m[tmp ^ c]--;
      c = tmp;
      tmp = tmp ^ c;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
