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