#include <bits/stdc++.h>
using namespace std;
int n, a[100002];
int main(void) {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  a[n] = a[0];
  a[n + 1] = a[1];
  for (int i = 1; i <= n; i++) {
    if (a[i - 1] != (a[i] ^ a[i + 1])) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
