#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return abs(a * b) / gcd(a, b); }
vector<ll> enum_div(ll n) {
  vector<ll> ret;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i != 1 && i * i != n) ret.push_back(n / i);
    }
  }
  ret.push_back(n);
  return ret;
}
vector<bool> IsPrime;
void sieve(size_t max) {
  if (max + 1 > IsPrime.size()) IsPrime.resize(max + 1, true);
  IsPrime[0] = false;
  IsPrime[1] = false;
  for (size_t i = 2; i * i <= max; ++i)
    if (IsPrime[i])
      for (size_t j = 2; i * j <= max; ++j) IsPrime[i * j] = false;
}
const string YES = "Yes";
const string NO = "No";
void solve(long long N, std::vector<long long> a) {
  map<ll, ll> x;
  bool all_zero = true;
  for (int i = 0; i < N; i++) {
    x[a[i]]++;
    if (a[i] != 0) all_zero = false;
  }
  if (all_zero) {
    cout << YES << endl;
    return;
  }
  ll now = 0, old = 0;
  bool can = true;
  for (auto i = x.begin(); i != x.end(); i++) {
    now ^= (i->first);
    old = (i->second);
    if (i == x.begin()) continue;
    if (!(old == (i->second))) can = false;
  }
  cout << (can && now == 0 ? YES : NO) << endl;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> a(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &a[i]);
  }
  solve(N, std::move(a));
}
