#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T>
bool chmax(T &a, const T &b) {
  return (a < b) ? (a = b, 1) : 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  return (b < a) ? (a = b, 1) : 0;
}
int main() {
  int n;
  cin >> n;
  vl a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  bool ok = true;
  for (int i = 2; i < n; ++i) {
    if ((a[i - 2] ^ a[i - 1]) != a[i]) {
      ok = false;
      break;
    }
  }
  if ((a[n - 1] ^ a[0]) != a[1]) ok = false;
  if ((a[n - 2] ^ a[n - 1]) != a[0]) ok = false;
  if (ok)
    cout << "Yes"
         << "\n";
  else
    cout << "No"
         << "\n";
  return 0;
}
