#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> value(n);
  for (int i = 0; i < (n); ++i) {
    cin >> value[i];
  }
  if (n % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  sort(value.begin(), value.end());
  int cnt = 0;
  long long now = -1;
  int sum = 0;
  for (int i = 0; i < (n); ++i) {
    if (i % (n / 3) == 0) sum ^= value[i];
    if (now != value[i]) {
      if ((cnt % (n / 3)) != 0) {
        cout << "No" << endl;
        return 0;
      }
      now = value[i];
      cnt = 1;
    } else {
      cnt++;
    }
  }
  if (sum != 0) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  return 0;
}
