#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int n;
vector<ll> a;
map<ll, int> memo, aa;
int main(void) {
  cin >> n;
  a = vector<ll>(n + 1);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    aa[a[i]]++;
  }
  a[n] = a[0];
  string ret = "Yes";
  for (int i = 0; i < n + 1; i++) {
    for (int j = i + 1; j < n + 1; j++) {
      memo[a[i] ^ a[j]]++;
    }
  }
  for (int i = 1; i < n + 1; i++) {
    if (aa[a[i]] > memo[a[i]]) {
      ret = "No";
      break;
    }
  }
  cout << ret << endl;
  return 0;
}
