#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
inline void chmin(A &a, B b) {
  if (a > b) a = b;
}
template <typename A, typename B>
inline void chmax(A &a, B b) {
  if (a < b) a = b;
}
signed main() {
  long long N;
  cin >> N;
  map<long long, long long> m;
  for (long long i = 0; i < (N); i++) {
    long long a;
    cin >> a;
    m[a]++;
  }
  if (N % 3) {
    if (m[0] == N) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    bool ok = true;
    long long x = 0;
    for (auto p : m) {
      if (p.second % (N / 3)) ok = false;
      for (long long i = 0; i < (p.second / (N / 3) + 1); i++) x ^= p.first;
    }
    if (x) ok = false;
    if (ok)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
