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