#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  vector<int> hats;
  multiset<int> rep;
  cin >> n;
  hats.resize(n);
  for (int x = 0; x < n; x++) {
    cin >> hats[x];
    rep.insert(hats[x]);
  }
  int l = hats[0];
  rep.erase(rep.find(hats[0]));
  for (int x = 1; x < n; x++) {
    l = hats[x - 1] ^ hats[x];
    rep.erase(rep.find(hats[x]));
    if (!rep.empty() && !rep.count(l)) {
      cout << "No";
      return 0;
    }
  }
  if (l == hats[0]) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
