#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<LL>;
using VVL = vector<VL>;
using VD = vector<double>;
using VVD = vector<VD>;
using PII = pair<int, int>;
using PDD = pair<double, double>;
using PLL = pair<LL, LL>;
using VPII = vector<PII>;
template <typename T>
using VT = vector<T>;
template <typename T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const int INF = 1e9;
const int MOD = INF + 7;
const LL LLINF = 1e18;
int main(void) {
  int N;
  cin >> N;
  VI a(N);
  for (int(i) = 0; (i) < (N); (i)++) cin >> a[i];
  map<int, int> cnt;
  for (int(i) = (1); (i) < (N); (i)++) {
    cnt[a[i]]++;
  }
  const auto key = a[0];
  for (auto &&e : (cnt)) {
    auto tmp = cnt;
    tmp[e.first]--;
    bool ok = true;
    auto prev_prev = key;
    auto prev = e.first;
    for (int(i) = 0; (i) < (N - 2); (i)++) {
      const auto nxt = prev_prev ^ prev;
      if (tmp.count(nxt) == 0) {
        ok = false;
        break;
      }
      if (--tmp[nxt] == 0) {
        tmp.erase(nxt);
      }
      prev_prev = prev;
      prev = nxt;
    }
    if (ok) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
