#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<unsigned int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int zyuzu = 0;
  for (int i = 1; i < n - 1; ++i) {
    zyuzu += i;
  }
  for (int i = 1; i <= zyuzu; ++i) {
    for (int j = 1; j <= (n - 2) - i; ++j) {
      if (a[0] != (a[i] ^ a[i + j])) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
