#include <bits/stdc++.h>
using ll = long long;
using namespace std;
constexpr int inf = 1e9;
constexpr ll linf = 1e18;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    mp[a]++;
  }
  if (n % 3) {
    cout << "No" << endl;
    return 0;
  }
  bool flag = true;
  int x = 0;
  for (auto &e : mp) {
    if (e.second != n / 3) {
      flag = false;
      break;
    }
    x ^= e.first;
  }
  if (x != 0) flag = false;
  cout << ((flag) ? "Yes" : "No") << endl;
  return 0;
}
