#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long INF = 1e18;
const int MAXN = 1e5;
const string name = "paintbarn";
int N, D;
bool square[1000001];
int points[10][10];
bool dist(int i, int j) {
  int sum = 0;
  for (int l = 0; l < (D); l++) {
    sum += (points[i][l] - points[j][l]) * (points[i][l] - points[j][l]);
  }
  return square[sum];
}
int main() {
  int N;
  cin >> N;
  int x = 0;
  for (int i = 0; i < N; i++) {
    int next;
    cin >> next;
    x ^= next;
  }
  if (x == 0)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
}
