#include <bits/stdc++.h>
using namespace std;
const long long INF = 1ll << 50;
long long n;
long long a[100000];
unordered_map<long long, long long> m;
unordered_map<long long, long long> o;
long long l, r;
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) {
    m[a[i]]++;
  }
  for (long long i = 0; i < n; i++) {
    if (o.find(a[i]) != o.end()) {
      l = a[0];
      r = a[i];
      m[l]--;
      m[r]--;
      for (long long i = 2; i < n; i++) {
        l = l ^ r;
        swap(l, r);
        if (m[r] > 0) {
          m[r]--;
        } else {
          cout << "No" << endl;
          return 0;
        }
      }
      if (l ^ r == a[0]) {
        cout << "Yes" << endl;
        return 0;
      } else {
        cout << "No" << endl;
        return 0;
      }
    } else {
      o[a[i] ^ a[0]] = a[i];
    }
  }
  cout << "No" << endl;
}
