#include <bits/stdc++.h>
unsigned long long int A[((10 * 10 * 10 * 10 * 10) + 1)];
unsigned long long int U[((10 * 10 * 10 * 10 * 10) + 1)];
unsigned long long int R[((10 * 10 * 10 * 10 * 10) + 1)];
void get_N(unsigned long long int *n) {
  int cnt;
  cnt = scanf("%lld", n);
  return;
}
int get_2nd(unsigned long long int target, unsigned long long int *a,
            unsigned long long int *u, long long int N,
            unsigned long long int *r) {
  int i;
  for (i = 0; i < N; i++) {
    if (a[i] == target) {
      u[i] = 1;
      *r = a[i];
      return 1;
    }
  }
  return 0;
}
int main() {
  int cnt;
  int i, j, s;
  unsigned long long int N;
  unsigned long long int c;
  get_N(&N);
  for (i = 0; i < N; i++) {
    cnt = scanf("%lld", &A[i]);
  }
  R[0] = A[0];
  U[0] = 1;
  for (i = 0; i < (N - 1); i++) {
    s = 0;
    for (j = 0; j < N; j++) {
      if (U[j] != 0) continue;
      U[j] = 1;
      s = get_2nd((R[i] ^ A[j]), A, U, N, &c);
      if (s == 0) {
        U[j] = 0;
        continue;
      }
      R[i + 2] = A[j];
      R[i + 1] = (R[i] ^ A[j]);
      i += 2;
    }
    if (s == 0) {
      printf("No");
      return 0;
    }
  }
  s = get_2nd((R[0] ^ R[N - 1]), A, U, N, &c);
  if (s == 0) {
    printf("No");
    return 0;
  }
  printf("Yes");
  return 0;
}
