#include <bits/stdc++.h>
using namespace std;
int main() {
  cout << fixed << setprecision(6);
  unsigned n;
  cin >> n;
  vector<unsigned> als(n);
  for (auto& a : als) cin >> a;
  sort(als.begin(), als.end());
  for (int i = 1; i < als.size() - 1; ++i) {
    if ((als[i - 1] ^ als[i + 1]) != als[i]) {
      cout << "No" << endl;
      return 0;
    }
  }
  if ((als[als.size() - 1] ^ als[1]) != als[0] ||
      (als[als.size() - 2] ^ als[0]) != als[als.size() - 1])
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}
