#include <bits/stdc++.h>
using namespace std;
map<int, vector<pair<int, int> > > a_to_side;
void circle(int k, int rest) {
  if (!a_to_side.empty()) {
    for (pair<int, int> p : a_to_side[k]) {
      ;
    }
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A;
  map<int, vector<int> > a_to_idx;
  bool flag = false;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    A.push_back(a);
    a_to_idx[a].push_back(i);
  }
  for (int i = 0; i < N - 1; i++) {
    bool t_flag = false;
    for (int j = i + 1; j < N; j++) {
      int xr = A[i] ^ A[j];
      if (!a_to_idx[xr].empty()) {
        t_flag = true;
        break;
      }
    }
    if (!t_flag) {
      flag = true;
      break;
    }
  }
  if (flag)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}
