#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
struct edge {
  int from, to;
  ll cost;
};
class Eratosthenes {
 public:
  vector<bool> prime;
  Eratosthenes(ll size) {
    size = max((int)sqrt(size) + 1, 101010);
    prime.resize(size, 1);
    prime[0] = 0;
    prime[1] = 0;
    for (size_t i = 2; i * i <= size; ++i)
      if (prime[i]) {
        for (size_t j = 2; i * j <= size; ++j) prime[i * j] = false;
      }
  }
};
class Combination {
  vector<ll> fac;
  vector<ll> ifac;

 public:
  Combination(ll size) {
    fac.resize(size);
    ifac.resize(size);
    fac[0] = 1;
    ifac[0] = 1;
    for (ll i = 0; i < size; i++) {
      fac[i + 1] = fac[i] * (i + 1) % MOD;
      ifac[i + 1] = ifac[i] * mpow(i + 1, MOD - 2) % MOD;
    }
  }
  ll mpow(ll x, ll n) {
    ll ans = 1;
    while (n != 0) {
      if (n & 1) ans = ans * x % MOD;
      x = x * x % MOD;
      n = n >> 1;
    }
    return ans;
  }
  ll comb(ll a, ll b) {
    if (a == 0 && b == 0) return 1;
    if (a < b || a < 0) return 0;
    ll tmp = ifac[a - b] * ifac[b] % MOD;
    return tmp * fac[a] % MOD;
  }
};
ll GCD(ll a, ll b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
ll LCM(ll a, ll b) {
  ll gcd = GCD(a, b);
  return a / gcd * b;
}
ll N, M;
int main() {
  cin >> N;
  int x = 0;
  for (int i = 0; i < N; ++i) {
    int a;
    cin >> a;
    x = x xor a;
  }
  if (x) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
