#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const long long INF = 1e9 + 47;
const int mod = 1000 * 1000 * 1000 + 7;
const long long LINF = INF * INF;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  map<int, int> cnt;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    cnt[x]++;
  }
  if (n % 3) {
    if ((int)((cnt).size()) > 1 || cnt.begin()->first) {
      cout << "No";
    } else {
      cout << "Yes";
    }
    return 0;
  }
  int suma = 0;
  for (auto x : cnt) {
    suma ^= x.first;
    if (x.second % (n / 3)) {
      cout << "No";
      return 0;
    }
  }
  cout << (suma == 0 ? "Yes" : "No") << endl;
  return 0;
}
