#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  set<long long> s;
  std::vector<long long> v;
  long long n, x;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
    s.insert(x);
  }
  bool flag = false;
  for (long long i = 0; i < n - 1; i++) {
    x = v[i] ^ v[i + 1];
    auto it = s.find(x);
    if (it != s.end()) {
      flag = true;
      s.erase(it);
    } else {
      flag = false;
      break;
    }
  }
  x = v[0] ^ v[n - 1];
  auto it = s.find(x);
  if (it != s.end() && flag) {
    flag = true;
    s.erase(it);
  }
  if (flag)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
