#include <bits/stdc++.h>
int yes(int *a, int *b, int N, int C) {
  for (int i = 0; i < N; i++) {
    if (a[i] == C && (*b >> i) == 0x00) {
      *b |= 0x01 << i;
      return 1;
    }
  }
  return 0;
}
int check(int *a, int N) {
  int z = 0;
  int y = 0;
  for (int j = 1; j < N; j++) {
    int b = 0;
    int d = a[0];
    int e = a[j];
    int temp = 0;
    for (int i = 1; i < N; i++) {
      if (i == N - 1) {
        return 1;
      } else if (yes(a, &b, N, d ^ e) == 1) {
        e ^= d;
        d ^= e;
        continue;
      } else
        break;
    }
  }
  return 0;
}
int main() {
  int N;
  scanf("%d", &N);
  int *a = (int *)malloc(sizeof(int) * N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  if (check(a, N) == 1) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}
