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