#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int dy[] = {1, 0, -1, 0};
int dx[] = {0, 1, 0, -1};
const int MAXN = 100000;
const int MAXE = 100000;
const int MAXV = 10000;
const int INF = 2e9;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int tmp = 0;
  for (int i = 0; i < n; i++) {
    tmp ^= a[i];
  }
  if (tmp == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
