#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
const long long INF = 2 * 1e18;
const int inf = 1e9 + 7;
using namespace std;
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> cnt;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    ++cnt[a[i]];
  }
  if (cnt[0] == n) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  vector<int> all;
  for (auto &p : cnt) {
    cout << p.first << " " << p.second << endl;
    for (int i = 0; i < p.second / (n / 3); i++) {
      all.push_back(p.first);
    }
  }
  if (all.size() == 3 && (all[0] ^ all[1] ^ all[2]) == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
