#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    if (m[a[i]] >= 1)
      m[a[i]]++;
    else
      m[a[i]] = 1;
  }
  int f = 0, pre1, pre2, fir = 0;
  vector<int> v;
  for (auto x : m) {
    int y = x.second;
    while (y--) {
      int z = x.first;
      v.push_back(z);
    }
  }
  if ((v[v.size() - 1] ^ v[1]) != v[0]) f = 1;
  if (f == 1)
    cout << "No";
  else {
    for (int i = 1; i < v.size(); i++) {
      if ((v[(i - 1) % v.size()] ^ v[(i + 1) % v.size()]) != v[i]) {
        f = 1;
        break;
      }
    }
    if (f == 1)
      cout << "No";
    else
      cout << "Yes";
  }
  return 0;
}
