#include <bits/stdc++.h>
using namespace std;
using int32 = int_fast32_t;
using int64 = int_fast64_t;
const int32 INF = 1e9;
const int32 MOD = 1e9 + 7;
const int64 LLINF = 1e18;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int32 n;
  cin >> n;
  vector<int32> a(n);
  map<int32, int32> amap;
  for (int64 i = 0; i < (n); ++i) {
    cin >> a[i];
    amap[a[i]]++;
  }
  if (n % 3 != 0) {
    cout << ((false) ? "Yes\n" : "No\n");
    return 0;
  }
  int32 sum = 0;
  for (auto iter = amap.begin(); iter != amap.end(); ++iter) {
    int32 f, s;
    tie(f, s) = *iter;
    if (s % (n / 3) != 0) {
      cout << ((false) ? "Yes\n" : "No\n");
      return 0;
    }
    sum ^= f;
  }
  if (sum != 0) {
    cout << ((false) ? "Yes\n" : "No\n");
  }
  cout << ((true) ? "Yes\n" : "No\n");
  return 0;
}
