#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; ++i) {
    cin >> a[i];
  }
  map<int, int> m;
  for (int x : a) {
    ++m[x];
  }
  if (m.size() > 3U || N % 3 != 0) {
    cout << "No\n";
    return 0;
  }
  vector<int> b;
  int xorb = 0;
  for (auto &p : m) {
    if (p.second % (N / 3) != 0) {
      cout << "No\n";
      return 0;
    }
    while (p.second >= N / 3) {
      p.second -= N / 3;
      b.push_back(p.first);
      xorb ^= p.first;
    }
  }
  cout << (xorb == 0 ? "Yes\n" : "No\n");
  return 0;
}
