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