#include <bits/stdc++.h>
int main() {
  int n;
  int ans = 0, t;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    ans = ans ^ t;
  }
  if (ans == 0)
    printf("YES");
  else
    printf("NO");
  return 0;
}
