#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int ans = 0;
  for (int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    ans = ans ^ x;
  }
  if (ans == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
