#include <bits/stdc++.h>
using namespace std;
long long XOR(long long a, long long b) {
  long long ans = 0;
  for (long long x = 2; x <= a * 2 || x <= b * 2; x *= 2) {
    long long A = a % x, B = b % x;
    if (A == B) {
      continue;
    } else if (A < B) {
      long long z = x / 2;
      ans += z;
      b -= z;
    } else {
      long long z = x / 2;
      ans += z;
      a -= z;
    }
  }
  return ans;
}
bool find(long long n, long long x, long long a[], long long b[]) {
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < x; ++j) {
      if (a[i] == b[j]) {
        b[j] = -1;
        break;
      } else if (j == x - 1) {
        return false;
      }
    }
  }
  return true;
}
int main() {
  long long n, x = 1, c = 0;
  cin >> n;
  for (long long i = n; 1 <= i; --i) {
    x *= i;
  }
  x /= 2;
  long long a[n + 10], b[x + 10000000000];
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; ++i) {
    for (long long j = i + 1; j < n; ++j) {
      b[c] = XOR(a[i], a[j]);
      ++c;
    }
  }
  if (find(n, x, a, b)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
