#include <bits/stdc++.h>
int main() {
  int n, a[100001], cnt = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  a[0] = a[n];
  a[n + 1] = a[1];
  for (int j = 1; j < n; j++) {
    for (int k = j + 1; k <= n; k++) {
      int s = a[j] ^ a[k];
      for (int i = 1; i <= n; i++) {
        if (s == a[i]) {
          cnt++;
        }
      }
    }
  }
  if (cnt == n) {
    printf("Yes");
    return 0;
  }
  printf("No");
  return 0;
}
