#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  ll n;
  cin >> n;
  vector<ll> v(n);
  for (int i = 0; i < (n); ++i) cin >> v[i];
  map<ll, bool> mem;
  for (auto x : v) mem[x] = true;
  sort(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    bool ok = false;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      ll num = v[i] ^ v[j];
      if (mem[num] == true) {
        ok = true;
        break;
      }
    }
    if (!ok) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
