#include <bits/stdc++.h>
using namespace std;
long long n, a;
bool f = true;
vector<long long> v;
signed main() {
  cin >> n;
  for (long long i = 0; i < (long long)(n); ++i) cin >> a, v.push_back(a);
  sort((v).begin(), (v).end());
  if (v[0] != (v[1] ^ v[n - 1])) f = false;
  for (long long i = 1; i < n - 1; ++i)
    if (v[i] != (v[i - 1] ^ v[i + 1])) f = false;
  if (v[n - 1] != (v[n - 2] ^ v[0])) f = false;
  if (f)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
