#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const ll mod = 1e9 + 7;
const int INF = 1e9;
const ll INFLONG = 1e18;
ll sum;
ll x;
int main() {
  ll n;
  cin >> n;
  ll a[n];
  ll sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + n);
  ll b[n];
  bool can = true;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      b[i] = a[i];
    } else {
      b[i] = a[n - i - 1];
    }
  }
  for (int i = 0; i < n; i++) {
    if (b[i] == (b[(i + 1) % n] ^ b[(i - 1 + n) % n])) {
    } else {
      can = false;
    }
  }
  if (can) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
