#include <bits/stdc++.h>
int cmp(const void *a, const void *b) { return (*(int *)a - *(int *)b); }
int main() {
  int N;
  int A[100000], B[100000];
  scanf("%d", &N);
  for (int i = 0; i < N; i++) scanf("%d", &A[i]);
  qsort((void *)A, N, sizeof(int), cmp);
  B[0] = A[0];
  for (int i = 1; i < N; i++) {
    B[1] = A[i];
    for (int j = 2; j < N; j++) B[j] = B[j - 1] ^ B[j - 2];
    qsort((void *)B, N, sizeof(int), cmp);
    int flag = 1;
    for (int j = 0; j < N; j++) {
      if (A[j] != B[j]) {
        flag = 0;
        break;
      }
    }
    if (flag == 1) {
      printf("Yes");
      return 0;
    }
  }
  printf("No");
  return 0;
}
