#include <bits/stdc++.h>
using namespace std;
bool notXOR(int a, int b, int c) {
  if (a ^ b != c)
    return true;
  else
    return false;
}
int main() {
  int N;
  cin >> N;
  int a[N];
  for (int i = 0; i < N; ++i) cin >> a[i];
  sort(a, a + N);
  do {
    int status = 0;
    for (int i = 1; i < N - 1; ++i) {
      if (notXOR(a[i - 1], a[i + 1], a[i])) {
        status = 1;
        break;
      }
    }
    if (notXOR(a[1], a[N - 1], a[0])) status = 1;
    if (notXOR(a[0], a[N - 2], a[N - 1])) status = 1;
    if (status == 0) goto YES;
  } while (next_permutation(a, a + 3));
  cout << "no" << endl;
  return 0;
YES:
  cout << "yes" << endl;
  return 0;
}
