#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> x(n);
  for (int i = 0; i < n; i++) cin >> x[i];
  map<int, int> cnt;
  for (int i = 0; i < n; i++) cnt[x[i]]++;
  if (cnt.size() > 3) {
    cout << "No" << endl;
    return 0;
  }
  sort(x.begin(), x.end());
  x.erase(unique(x.begin(), x.end()), x.end());
  int cur = x[0], prev = x.back();
  for (int i = 1; i < n; i++) {
    if (cnt[cur] <= 0) {
      cout << "No" << endl;
      return 0;
    }
    cnt[cur]--;
    int buf = cur;
    cur = cur ^ prev;
    prev = buf;
  }
  cout << "Yes" << endl;
  return 0;
}
