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