#include <bits/stdc++.h>
using namespace std;
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" << endl;
  else
    cout << "NO" << endl;
}
