#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < n; i++) cin >> vec[i];
  int temp = vec[0] ^ vec[1];
  for (int i = 2; i < n; i++) temp = temp ^ vec[i];
  if (temp)
    cout << "NO\n";
  else
    cout << "YES\n";
}
