#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> a;
vector<int> y;
int kkkco = 0;
bool fff(int pre, int now);
int tmp, tmp1, tmp2, tmp3;
int main() {
  cin >> N;
  int hud = 0;
  for (int hud = 0; hud < (N); hud++) {
    cin >> tmp2;
    a.push_back(tmp2);
    y.push_back(0);
  }
  sort((a).begin(), (a).end());
  y[N - 1] = 1;
  for (int i = 0;; i++) {
    if (int(a[N - 1] / 2) == int(a[N - 2 - i] / 2)) {
      for (int tmp3 = 0; tmp3 < (N - 2); tmp3++) y[tmp3] = 0;
      y[N - 2 - i] = 1;
      kkkco = 2;
      if (fff(a[N - 1], a[N - 2 - i]) == true) {
        cout << "Yes" << endl;
        return 0;
      }
    } else
      break;
  }
  cout << "No" << endl;
  return 0;
}
bool fff(int pre, int now) {
  int pos = pre ^ now;
  for (int i = 0; i < N - 1; i++) {
    cout << i << endl;
    if (y[i] == 0 && a[i] == pos) {
      kkkco++;
      y[i] = 1;
      if (kkkco == N) {
        if (pre ^ now == a[N - 1]) {
          return true;
        }
      }
      fff(now, pos);
    }
  }
  return false;
}
