#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
template <class T>
using PQ = priority_queue<T>;
template <class T>
using PQR = priority_queue<T, vector<T>, greater<T> >;
const ll MOD = 1000000007;
int main() {
  int n, t;
  map<int, int> mp;
  cin >> n;
  V<int> v;
  int f, s;
  cin >> f >> s;
  v.push_back(f);
  v.push_back(s);
  for (int i = (0); i < (n - 2); i++) {
    cin >> t;
    mp[t] += 1;
  }
  for (int i = (0); i < (n - 2); i++) {
    int next = (v[i] ^ v[i + 1]);
    v.push_back(next);
    if (mp[next] != 0) {
      mp[next] -= 1;
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  if ((mp[n - 2] ^ mp[n - 1]) != mp[0]) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
}
