#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
const long long int LINF = 100100100100100100;
const double EPS = 1e-10;
const double PI = acos(-1.0);
int main() {
  int n;
  cin >> n;
  vector<long long int> A;
  for (int i = 0; i < (int)(n); i++) {
    long long int a;
    cin >> a;
    A.push_back(a);
  }
  long long int ans = A[0];
  for (int i = 1; i <= (int)(n - 1); i++) {
    ans ^= A[i];
  }
  if (ans == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
