#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  bool ok = true;
  for (int i = 1; i < n - 1; i++) {
    if ((arr[i - 1] ^ arr[i + 1]) != arr[i]) {
      ok = false;
    }
  }
  if ((arr[1] ^ arr[n - 1]) != arr[0]) {
    ok = false;
  }
  if ((arr[n - 2] ^ arr[0]) != arr[n - 1]) ok = false;
  if (ok) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
}
