#include <bits/stdc++.h>
using namespace std;
using i64 = long;
const i64 MOD = 1e9 + 7;
const i64 INF = 1e18 + 7;
signed main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto& x : a) cin >> x;
  set<int> s;
  for (int i = 1; i < n; ++i) s.emplace(a[i]);
  for (int k = 1; k < n; ++k) {
    s.erase(a[k]);
    vector<int> v{a[0], a[k]};
    bool fl = true;
    for (int i = 2; i < n; ++i) {
      int nex = v[i - 2] ^ v[i - 1];
      auto it = s.find(nex);
      if (it == s.end()) {
        fl = false;
        break;
      }
      v.emplace_back(nex);
      s.erase(it);
    }
    for (int i = 1; i < n; ++i) s.emplace(i);
    if (fl) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
