#include <bits/stdc++.h>
using namespace std;
bool success = false;
void recursive(vector<vector<int>>& a, unordered_set<int> remained, int pre,
               int prepre) {
  if (success) return;
  remained.erase(pre);
  if (remained.size() == 0) {
    success = true;
    return;
  }
  for (int num : remained) {
    bool flag = true;
    if (prepre != -1) {
      for (int i = 0; i < 32; ++i) {
        if (a[num][i] != (a[pre][i] ^ a[prepre][i])) {
          flag = false;
          break;
        }
      }
    }
    if (flag) recursive(a, remained, num, pre);
  }
}
int main() {
  int n;
  cin >> n;
  vector<vector<int>> a(n, vector<int>(32));
  for (auto& ai : a) {
    int _ai;
    cin >> _ai;
    for (int i = 0; i < 32; ++i) {
      ai[i] = _ai & 1;
      _ai = _ai >> 1;
    }
  }
  unordered_set<int> remained;
  for (int i = 1; i < n; ++i) remained.insert(i);
  recursive(a, remained, 0, -1);
  cout << (success ? "Yes" : "No") << endl;
  return 0;
}
