#include <bits/stdc++.h>
using lint = long long int;
using namespace std;
constexpr int MOD = 2019;
int main() {
  int N;
  cin >> N;
  set<int> a;
  for (int i = 0; i < N; i++) {
    int t;
    cin >> t;
    a.insert(t);
  }
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      int x = i ^ j;
      if (a.find(x) == a.end()) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
