#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];
  if (n % 3 == 0) {
    for (long long i = 0; i < n; i++) {
      m[a[i]]++;
    }
    for (auto x : m) {
      if (o.find(x.first) != o.end()) {
        l = a[0];
        r = x.first;
        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[x.first ^ a[0]] = x.first;
      }
    }
    cout << "No" << endl;
  } else {
    cout << "No" << endl;
  }
}
