#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = (0); i < ((n)); ++i) cin >> a[i];
  if (n % 3) {
    bool flag = true;
    for (long long i = (0); i < ((n)); ++i)
      if (a[i]) flag = false;
    if (flag)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else {
    map<long long, long long> mp;
    for (long long i = (0); i < ((n)); ++i) mp[a[i]]++;
    if (mp.size() <= 3) {
      bool flag = true;
      long long tmp = 0;
      for (auto itr = (mp).begin(); itr != (mp).end(); ++itr) {
        if (itr->second %= n / 3) flag = false;
        for (long long _ = (0); _ < ((itr->second / (n / 3))); ++_)
          tmp ^= itr->first;
      }
      if (flag && tmp == 0)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    } else
      cout << "No" << endl;
  }
  return 0;
}
