#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const double PI = acos(-1);
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  map<long long, long long> mp;
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
    mp[a.at(i)] += 1;
  }
  sort(a.begin(), a.end());
  string ans = "Yes";
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      long long key = a[i] ^ a[j];
      auto itr = find(a.begin(), a.end(), key);
      if (j < n - 1 && itr == a.end()) continue;
      if (0 < mp[key])
        mp[key] -= 1;
      else
        ans = "No";
    }
  }
  cout << ans << endl;
}
