#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  bool check = true;
  do {
    check = true;
    for (int i = 0; i < n; i++) {
      if (a[i] != (a[(n + i - 1) % n] ^ a[(i + 1) % n])) {
        check = false;
        break;
      } else
        continue;
    }
    if (check) break;
  } while (next_permutation(a, a + n));
  if (check)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
