#include <bits/stdc++.h>
#pragma GCC optimize "-O3"
#pragma GCC target("avx")
signed gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
signed lcm(long long a, long long b) { return a * b / gcd(a, b); }
using namespace std;
const long long mod = 1e9 + 7;
void run();
void init() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
}
signed main() {
  init();
  run();
  return 0;
}
void run() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  long long num = 0;
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < n; ++j) {
      if (i == j) continue;
      for (long long k = j + 1; k < n; ++k) {
        if (k == i) continue;
        if (a[i] == (a[j] ^ a[k])) {
          ++num;
          goto NEXT;
        }
      }
    }
  NEXT:;
  }
  if (num == n)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
