#include <bits/stdc++.h>
using ll = long long;
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort((a).begin(), (a).end());
  bool ok = true;
  for (int i = 1; i < n - 1; i++)
    if (a[i] != a[i - 1] ^ a[i + 1]) ok = false;
  if (a[0] != a[1] ^ a[n - 1]) ok = false;
  if (a[n - 1] != a[n - 2] ^ a[0]) ok = false;
  if (ok)
    cout << "Yes";
  else
    cout << "No";
  cout << "\n";
  return 0;
}
