#include <bits/stdc++.h>
using namespace std;
const int MM = 1000000000;
const int MOD = MM + 7;
const int MAX = 510000;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const long long INF = 1LL << 60;
const double pi = acos(-1.0);
int main() {
  long long n;
  cin >> n;
  map<long long, long long> m;
  long long f, s;
  cin >> f >> s;
  for (long long i = 0; i < n - 1; i++) {
    long long a;
    cin >> a;
    m[a]++;
  }
  long long pre = f;
  long long now = f ^ s;
  for (long long i = 0; i < n - 2; i++) {
    if (!m.count(now)) {
      cout << "No" << endl;
      return 0;
    }
    m[now]--;
    now = pre ^ now;
  }
  cout << "Yes" << endl;
}
