#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  cin >> n;
  long long int flag = 0;
  vector<long long int> a;
  for (long long int i = 0; i < n; i++) {
    long long int k;
    cin >> k;
    a.push_back(k);
  }
  for (long long int i = 0; i < n - 1; i++) {
    for (long long int j = i + 1; j < n; j++) {
      long long int val = a[i] ^ a[j];
      if (find(a.begin(), a.end(), val) == a.end()) {
        cout << "No"
             << "\n";
        return 0;
      } else
        continue;
    }
  }
  if (flag == 0)
    cout << "Yes"
         << "\n";
  clock_t clk = clock();
  clk = clock() - clk;
  cerr << "Time Elapsed: " << fixed << setprecision(10)
       << ((long double)clk) / CLOCKS_PER_SEC << "\n";
  return 0;
}
