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