#include <bits/stdc++.h>
using namespace std;
long long power(long long, long long);
long long ncr(long long, long long);
void seive();
void fact();
const long long M = 5;
void powmat(long long B[M][M], long long A[M][M], long long n);
void matrix_multi(long long A[M][M], long long B[M][M]);
long long mul(long long a, long long b);
const int mod = 1e9 + 7;
const long long N = 100002LL;
long long fac[N + 2];
long long prime[N + 3];
vector<long long> primes;
long long inv[N + 2];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  {
    long long n;
    cin >> n;
    long long x = 0, tp;
    for (long long i = 0; i < n; i++) cin >> tp, x ^= tp;
    if (x == 0)
      cout << "YES";
    else
      cout << "NO";
  }
  return 0;
}
long long mul(long long a, long long b) { return ((a) * (b)) % (mod); }
void seive() {
  for (long long i = 2; i * i <= N; i++) {
    if (!prime[i]) {
      for (long long j = i * i; j <= N; j += i) prime[j] = 1;
    }
  }
  for (long long i = 2; i < N + 1; i++)
    if (!prime[i]) primes.push_back(i);
}
long long power(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = mul(res, a);
    n >>= 1;
    a = mul(a, a);
  }
  return res;
}
void fact() {
  inv[0] = fac[0] = 1;
  for (long long i = 1; i < N; i++) {
    fac[i] = mul(fac[i - 1], i);
    inv[i] = power(fac[i], mod - 2);
  }
}
long long ncr(long long r, long long n) {
  if (r > n) return 0;
  long long e = fac[n];
  e = mul(e, inv[r]);
  e = mul(e, inv[n - r]);
  return e;
}
void matrix_multi(long long A[M][M], long long B[M][M]) {
  long long C[M][M];
  for (long long i = 0; i < M; i++) {
    for (long long j = 0; j < M; j++) {
      C[i][j] = 0;
      for (long long k = 0; k < M; k++) {
        C[i][j] = (C[i][j] % mod + mul(A[i][k], B[k][j]) % mod + mod) % mod;
      }
    }
  }
  for (long long i = 0; i < M; i++) {
    for (long long j = 0; j < M; j++) {
      A[i][j] = C[i][j] % (mod);
    }
  }
}
void powmat(long long B[M][M], long long A[M][M], long long n) {
  while (n) {
    if (n & 1) matrix_multi(B, A);
    matrix_multi(A, A);
    n >>= 1;
  }
}
