#include <bits/stdc++.h>
int main() {
  int N;
  std::cin >> N;
  std::deque<int> a(N);
  for (auto& v : a) std::cin >> v;
  std::sort(begin(a), end(a));
  bool ans = false;
  int decided1 = a.front();
  int decided2;
  a.pop_front();
  for (int i = 0; i < N - 1; ++i) {
    int v = decided1 ^ a[i];
    auto iter = std::lower_bound(begin(a) + i + 1, end(a), v);
    if (iter == end(a) || *iter != v) continue;
    decided2 = v;
    a.erase(begin(a) + i);
    ans = true;
    break;
  }
  while (ans && !a.empty()) {
    int v = decided1 ^ decided2;
    auto iter = std::lower_bound(begin(a), end(a), v);
    if (iter == end(a) || *iter != v) {
      ans = false;
      break;
    }
    decided1 = decided2;
    decided2 = v;
    a.erase(iter);
  }
  std::cout << (ans ? "Yes" : "No") << std::endl;
}
