#include <bits/stdc++.h>
int main(void) {
  int i, j, k;
  int N;
  unsigned long long a[100000], temp;
  scanf("%d", &N);
  for (i = 0; i < N - 1; i++) {
    scanf("%lld\n", &a[i]);
  }
  scanf("%lld", &a[i]);
  for (i = 1; i < N - 1; i++) {
    for (j = i; j < N; j++) {
      for (k = i; k < N; k++) {
        if (j != k) {
          if (a[j] == (a[i - 1] ^ a[k])) {
            temp = a[i];
            a[i] = a[j];
            a[j] = temp;
            temp = a[k];
            a[k] = a[i + 1];
            a[i + 1] = temp;
          }
        }
      }
    }
  }
  for (i = 1; i < N - 1; i++) {
    if (a[i] != (a[i - 1] ^ a[i + 1])) {
      printf("No\n");
      return 0;
    }
  }
  if (a[N - 1] != (a[0] ^ a[N - 2])) {
    printf("No\n");
    return 0;
  }
  printf("Yes\n");
  return 0;
}
