#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  sort((a).begin(), (a).end());
  int ans = 0;
  for (int i = 1; i < n - 1; i++) {
    ans = a.at(i - 1) ^ a.at(i + 1);
    if (ans != a.at(i)) {
      for (int j = i; j < n; j++) {
        if (ans == a.at(j)) {
          swap(a.at(j), a.at(i));
        } else if (j == n - 1) {
          cout << "No" << endl;
          return 0;
        }
      }
    }
  }
  ans = a.at(n - 2) ^ a.at(0);
  if (ans != a.at(n - 1)) cout << "No" << endl;
  ans = a.at(n - 1) ^ a.at(1);
  if (ans != a.at(0)) cout << "No" << endl;
  cout << "Yes" << endl;
  return 0;
}
