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