#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n;
  cin >> n;
  long int a[n];
  unordered_map<long int, long int> mp;
  for (long int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  for (long int i = 0; i < n; i++) {
    for (long int j = i + 1; j < n; j++) {
      long int temp = a[i] ^ a[j];
      if (mp[temp] != 0) {
        mp[temp]--;
      }
    }
  }
  for (long int i = 0; i < n; i++) {
    if (mp[a[i]] > 0) {
      cout << "No";
      exit(0);
    }
  }
  cout << "Yes\n";
  return 0;
}
