#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  long long i;
  long long A;
  map<long long, long long> count;
  cin >> N;
  for (i = 0; i < N; i++) {
    cin >> A;
    if (count.find(A) == count.end()) {
      count[A] = 1;
    } else {
      count[A]++;
    }
  }
  if (count.size() == 1 && count.find(0) != count.end()) {
    cout << "Yes\n";
  } else if (count.size() == 3) {
    long long t = -1;
    long long xored = 0;
    for (auto p : count) {
      xored ^= p.first;
      if (t == -1) {
        t = p.second;
      } else if (t != p.second) {
        cout << "No\n";
        return 0;
      }
    }
    cout << ((xored == 0) ? "Yes" : "No") << '\n';
  } else {
    cout << "No\n";
  }
  return 0;
}
