#include <bits/stdc++.h>
using namespace std;
void nope() {
  cout << "No\n";
  exit(0);
}
void yep() {
  cout << "Yes\n";
  exit(0);
}
int32_t main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  map<long long, long long> f;
  for (long long i = 0; i < n; ++i) f[a[i]]++;
  if (f.size() == 1 && f.begin()->first == 0) yep();
  if (n % 3 || f.size() != 3) nope();
  long long xo = 0;
  for (auto p : f) {
    if (p.second != n / 3) nope();
    xo ^= p.first;
  }
  if (xo != 0) nope();
  yep();
  return 0;
}
