#include <bits/stdc++.h>
using namespace std;
int n;
int a[100000 + 5];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int flag = 0;
  for (int i = 0; i < n; i++) {
    flag ^= a[i];
  }
  if (flag == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
