#include <bits/stdc++.h>
using namespace std;
template <class T>
void chmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void chmin(T &a, T b) {
  if (a > b) a = b;
}
int gcd(int a, int b) {
  if (a < b) gcd(b, a);
  if (b == 0)
    return a;
  else
    gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < (n); i++) {
    int a;
    cin >> a;
    mp[a]++;
  }
  if (mp.size() > 3) {
    cout << "No" << endl;
  } else if (mp.size() == 3) {
    int tmp = 0;
    for (auto m : mp) {
      tmp ^= m.first;
    }
    if (tmp == 0) {
      cout << "Yes" << endl;
    } else
      cout << "No" << endl;
  } else if (mp.size() == 2) {
    int cnt = 1;
    for (auto m : mp) {
      if (cnt == 1) {
        if (m.first != 0 || m.second != n / 3) {
          cout << "No" << endl;
          return 0;
        }
        cnt++;
      }
    }
    cout << "Yes" << endl;
  } else {
    for (auto m : mp) {
      if (m.first == 0)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    }
  }
  return 0;
}
