#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll MOD = 1000000007;
constexpr ll INF = 1ll << 60;
int main(int argc, char **argv) {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < N; ++i) cin >> A[i];
  sort(A.begin(), A.end());
  ll ok{true};
  for (ll i = 0; i < N; ++i) {
    ll r = (i + 1) % N;
    ll l = (i - 1 + N) % N;
    if (A[i] != (A[r] ^ A[l])) ok = false;
  }
  std::cout << (ok ? "Yes" : "No") << std::endl;
}
