#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main(int argc, char const *argv[]) {
  int n;
  std::cin >> n;
  std::map<int, int> m;
  for (size_t i = 0; i < n; i++) {
    int tmp;
    std::cin >> tmp;
    if (m[tmp] == 0) {
      m[tmp] = 1;
    } else {
      m[tmp]++;
    }
  }
  auto itr = m.begin();
  int first = itr->first;
  m[first]--;
  int pre = first;
  int now, next;
  for (auto i = m.begin(); i != m.end(); i++) {
    if (i->second > 0) {
      now = i->first;
    } else {
      continue;
    }
    bool flag = true;
    for (size_t isi = 2; isi < n; isi++) {
      next = pre ^ now;
      if (m[next] == 0) {
        flag = false;
        break;
      }
      m[next]--;
      pre = now;
      now = next;
    }
    if (flag) {
      if (first == pre ^ now) {
        std::cout << "Yes" << '\n';
        return 0;
      }
    }
  }
  std::cout << "No" << '\n';
  return 0;
}
