#include <bits/stdc++.h>
using namespace std;
int now, n, k;
int main() {
  int ans = 0;
  cin >> n;
  vector<int> a(n);
  vector<pair<int, int> > pairs(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  if (a[n - 1] == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  ans = a[0] - 1;
  int w = -1;
  int ansxor = 0;
  for (long long i = 0; i < n; i++) {
    if (ans != a[i]) {
      w++;
      ansxor = ansxor ^ a[i];
      pairs[w].first = a[i];
      pairs[w].second = 1;
      ans = a[i];
    } else {
      pairs[w].second++;
    }
  }
  w++;
  if (w > 3) {
    cout << "No" << endl;
    return 0;
  }
  if (n % 3 != 0) {
    cout << "No" << endl;
    return 0;
  }
  if (w == 2) {
    if ((pairs[0].second == pairs[1].second * 2) &
        (pairs[0].second * 2 == pairs[1].second)) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    return 0;
  }
  if (ansxor != 0) {
    cout << "No" << endl;
    return 0;
  }
  if (w == 3) {
    if ((pairs[0].second == pairs[1].second) &
        (pairs[1].second == pairs[2].second)) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    return 0;
  }
  if (w == 1) {
    cout << "No" << endl;
    return 0;
  }
  cout << "No" << endl;
  return 0;
}
