#include <bits/stdc++.h>
using si = std::int32_t;
using ui = std::uint32_t;
using ull = std::uint64_t;
si main() {
  ui n;
  std::cin >> n;
  std::map<ull, ull> mp;
  for (ui i{}; i < n; ++i) {
    ui t;
    std::cin >> t;
    mp[t] += 2;
  }
  bool check = true;
  auto it = std::begin(mp);
  auto end_ = std::end(mp);
  while (it != end_ && ++it != end_ && check) {
    auto x = *it;
    auto y = *(++it);
    if (x.second > 0 && y.second > 0) {
      auto zit = mp.find(x.first ^ y.first);
      if (zit == end_ || zit->second == 0)
        check = false;
      else {
        --x.second;
        --y.second;
        zit->second -= 1;
      }
    }
  }
  std::cout << (check ? "Yes" : "No") << "\n";
  return 0;
}
