#include <bits/stdc++.h>
using namespace std;
bool b[1000000100];
bool ava[1000000100];
int n, a[100100];
int main() {
  int k, l;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    ava[a[i]] = 1;
  }
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (ava[a[i] ^ a[j]] == 0) continue;
      memset(b, 0, sizeof(b));
      k = a[i];
      l = a[j];
      b[k] = 1;
      b[l] = 1;
      for (int o = 3; o <= n; o++) {
        if (ava[k ^ j] == 0) break;
        if (b[k ^ j] == 1) break;
        l = k ^ l;
        k = k ^ l;
        if (o == n) {
          cout << "Yes" << endl;
          return 0;
        }
      }
    }
  }
  cout << "No" << endl;
}
