#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = (0); i < ((n)); ++i) cin >> a[i];
  sort(a.begin(), a.end());
  bool flag = true;
  for (long long i = (0); i < ((n - 2)); ++i) {
    if ((a[i] ^ a[i + 2]) == a[i + 1]) continue;
    flag = false;
  }
  if ((a[0] ^ a[n - 2]) != a[n - 1] || (a[n - 1] ^ a[1]) != a[0]) flag = false;
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
