#include <bits/stdc++.h>
using namespace std;
int ok(vector<int> a, int b0, int b1, int N) {
  int l = 0;
  vector<int> aa(a.size());
  copy(a.begin(), a.end(), aa.begin());
  vector<int>::iterator k = find(aa.begin(), aa.end(), b0);
  aa.erase(k);
  k = find(aa.begin(), aa.end(), b1);
  aa.erase(k);
  while (1) {
    int b = b0 ^ b1;
    vector<int>::iterator k = find(aa.begin(), aa.end(), b);
    if (k != aa.end()) {
      if (l % 2 == 0)
        b0 = b;
      else
        b1 = b;
      aa.erase(k);
    } else {
      return -1;
    }
    l++;
    if (l < N) {
      return 0;
    }
  }
}
int main(void) {
  int N;
  cin >> N;
  vector<int> a;
  for (int i = 0; i < N; i++) {
    int ia;
    cin >> ia;
    a.push_back(ia);
  }
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      {
        if (ok(a, a[i], a[j], N) == 0) {
          cout << "Yes" << endl;
          return 0;
        }
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
