#include <bits/stdc++.h>
using namespace std;
int n, a[100010];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  for (int i = 0; i < n; i++)
    if (a[i] != (a[(i - 1 + n) % n] ^ a[(i + 1) % n])) return puts("No"), 0;
  puts("Yes");
  return 0;
}
