#include <bits/stdc++.h>
using namespace std;
int n, Xor;
int arr[100009];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i], Xor ^= arr[i];
  for (int i = 0; i < n; i++) {
    if (Xor ^ arr[i] != arr[i]) puts("NO"), exit(0);
  }
  puts("YES");
}
