#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i < n; i ++)
#define rep1(i, n) for (int i=1; i <= n; i ++)
using namespace std;

typedef pair<int, int> P;

#define N_MAX 100000



map<int, vector<P> > a_to_side;

void circle(int k, int rest) {
  if (!a_to_side.empty()) {
    for (P p: a_to_side[k]) {
      ;
    }
  }
}


int main() {
  int N;
  cin >> N;
  vector<int> A;
  map<int, vector<int> > a_to_idx;
  bool flag = false;

  rep(i, N) {
    int a;
    cin >> a;
    A.push_back(a);
    a_to_idx[a].push_back(i);
  }
  rep(i, N - 1) {
    bool t_flag = false;
    for (int j = i + 1; j < N; j ++) {
      int xr = A[i] ^ A[j];
      if (!a_to_idx[xr].empty() ) {
        # for (int k: a_to_idx[xr]) {
        #   a_to_side[k].push_back(P(i, j));
        # }
        t_flag = true;
        break;
      }
    }
    if (!t_flag) {
      flag = true;
      break;
    }
  }
  if (flag) cout << "No" << endl;
  else cout << "Yes" << endl;
  return 0;
}
