#include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll gcd(ll a, ll b) {
  if (a < b) swap(a, b);
  if (b <= 0) return -1;
  ll r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
ll lcm(ll a, ll b) { return (a / gcd(a, b) * b); }
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (ll i = 0; i < N; i++) cin >> a[i];
  sort(a.begin(), a.end());
  bool flag = false;
  for (ll i = 0; i < N; i++) {
    int tmp = a[i] ^ a[(i + 2) % N];
    if (tmp != a[(i + 1) % N]) {
      flag = true;
      break;
    }
  }
  string ans = (!flag ? "Yes" : "No");
  cout << ans;
  cout << "\n";
  return 0;
}
