#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 50;
long long a[M], b[M] = {0};
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int f = 0;
  for (int i = 0; i < n; i++) {
    if (b[i] == 2) continue;
    for (int j = i; j < n; j++) {
      if (b[j] == 2) continue;
      int k = find(a, a + n, (a[i] ^ a[j])) - a;
      if (k != n && b[k] < 2) {
        b[i]++;
        b[j]++;
        b[k]++;
      }
    }
    if (b[i] < 2) {
      f = 1;
      break;
    }
  }
  if (f == 0)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
