#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)];
unsigned long long int RU[((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 (u[i] != 0) continue;
    if (a[i] == target) {
      u[i] = 1;
      *r = a[i];
      return 1;
    }
  }
  return 0;
}
int main() {
  int cnt;
  int i, j, k, s, z;
  unsigned long long int N;
  unsigned long long int c;
  unsigned long long int e = 0;
  get_N(&N);
  j = 0;
  k = 0;
  for (i = 0; i < N; i++) {
    cnt = scanf("%lld", &A[i]);
    if (i == 0) {
      R[0] = A[0];
      U[0] = 1;
      RU[0] = 1;
      k = 1;
      continue;
    }
    e++;
    if (e < 2) {
      continue;
    }
    if (i == k) continue;
    if ((R[j] ^ A[i]) == A[k]) {
      R[j + 1] = A[k];
      U[k] = 1;
      RU[j + 1] = 1;
      R[j + 2] = A[i];
      RU[j + 2] = 1;
      U[i] = 1;
      j += 2;
      k = i + 1;
      e -= 2;
    }
  }
  if (RU[N - 1] == 1) {
    printf("Yes");
    return 0;
  }
  z = j;
  for (i = z; i < (N - 1); i++) {
    if (RU[i] != 0) continue;
    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 += 1;
    }
    if (s == 0) {
      printf("No");
      return 0;
    }
  }
  s = get_2nd((R[0] ^ R[N - 2]), A, U, N, &c);
  if (s == 0) {
    printf("No");
    return 0;
  }
  printf("Yes");
  return 0;
}
