#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  map<long long, int> m;
  for (int i = 0; i < (int)(n); i++) {
    long long mi;
    cin >> mi;
    m[mi]++;
  }
  if (m.count(0) == n) {
    cout << "Yes" << endl;
    return 0;
  }
  if (n % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  if (m.size() == 2 && m.count(0) == n / 3) {
    cout << "Yes" << endl;
    return 0;
  } else if (m.size() == 3) {
    long long ans = 0;
    for (auto mi = m.begin(); mi != m.end(); mi++) {
      if (mi->second != n / 3) {
        cout << "No" << endl;
        return 0;
      }
      ans ^= mi->first;
    }
    if (ans == 0) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
