#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];
  }
  const bool check = [&]() {
    if (mp.find(0) != std::end(mp) && mp.size() == 1)
      return true;
    else if (n % 3 != 0 || mp.size() > 3 || mp.size() == 1)
      return false;
    else {
      auto it = std::begin(mp);
      auto check = true;
      if (mp.size() == 2)
        check = mp[0] * 2 == (++it)->second;
      else if (mp.size() == 3) {
        auto n = it->first;
        auto c = it->second;
        auto p = [&]() { std::cout << " " << n << " " << c << "\n"; };
        ++it;
        while (it != std::end(mp)) {
          n ^= it->first;
          check &= c == it->second;
          ++it;
        }
        p();
        check &= n == 0;
      }
      return check;
    }
  }();
  std::cout << (check ? "Yes" : "No") << "\n";
  return 0;
}
