#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  long long int x, ans = 0;
  for (int i = (int)1; i <= (int)n; i++) {
    cin >> x;
    ans ^= x;
  }
  if (ans == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
