#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  map<int, int> d;
  int a;
  for (int i = 0; i < (N); i++) {
    cin >> a;
    d[a]++;
  }
  if (d.size() != 3) {
    cout << "No" << endl;
  } else {
    int tot_xor = 0;
    vector<int> b;
    for (auto p : d) {
      tot_xor ^= p.first;
      b.push_back(p.second);
    }
    if (tot_xor == 0 && (b[0] == b[1] && b[1] == b[2] && b[2] == b[0]))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
