#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<long long> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < a.size(); i++) {
    if ((a[i % N] ^ a[(i + 2) % N]) != a[(i + 1) % N]) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
