#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long mod = 1e9 + 7;
const long long mod1 = 998244353;
const long long big = 1e18;
const double PI = 2 * asin(1);
int main() {
  int N;
  cin >> N;
  vector<long long> a(N);
  map<long long, long long> amap;
  for (int i = 0; i < N; ++i) {
    cin >> a[i];
    amap[a[i]]++;
  }
  sort(a.begin(), a.end(), greater<long long>());
  amap[a[0]]--;
  amap[a[1]]--;
  bool can = true;
  vector<long long> ans;
  ans.push_back(a[0]);
  ans.push_back(a[1]);
  long long tmp;
  for (int i = 2; i < N; ++i) {
    tmp = ans[ans.size() - 1] ^ ans[ans.size() - 2];
    if (amap[tmp] == 0) can = false;
    ans.push_back(tmp);
    amap[tmp]--;
  }
  if ((ans[ans.size() - 1] ^ ans[1]) != ans[0]) can = false;
  if (can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
