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