#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, i, all_xor_flag;
  scanf("%d", &N);
  int a[N];
  for (i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  std::sort(a, a + N);
  do {
    all_xor_flag = 1;
    for (i = 0; i < N; i++) {
      if ((a[(N + i - 1) % N] ^ a[(N + i + 1) % N]) != a[i]) {
        all_xor_flag = 0;
        break;
      }
    }
    if (all_xor_flag) {
      printf("Yes\n");
      return 0;
    }
  } while (next_permutation(a + 1, a + N));
  printf("No\n");
  return 0;
}
