#include <bits/stdc++.h>
using namespace std;
int main() {
  long int N;
  cin >> N;
  int a[N + 10];
  for (int i = 0; i < N; i++) cin >> a[i];
  sort(a, a + N);
  if (N % 3 == 0) {
    int x = a[0], y = a[N / 3], z = a[2 * N / 3];
    if (a[N / 3 - 1] == x && a[2 * N / 3 - 1] == y && a[N - 1] == z &&
        x ^ y ^ z == 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    if (a[N - 1] == 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
