#include <bits/stdc++.h>
using namespace std;
class AXORCircle {
 public:
  static constexpr long long kStressIterations = 0;
  static void generateTest(std::ostream& test) {}
  void solve(std::istream& cin, std::ostream& cout) {
    long long N;
    cin >> N;
    vector<long long> a(N);
    for (long long i = 0, i_len = (N); i < i_len; ++i) cin >> a[i];
    sort(a.begin(), a.end());
    bool ok = true;
    for (long long i = 0, i_len = (N - 2); i < i_len; ++i) {
      if ((a[i] ^ a[i + 1]) != a[i + 2]) {
        ok = false;
        break;
      }
    }
    if ((a[N - 2] ^ a[N - 1]) != a[0]) ok = false;
    if ((a[N - 1] ^ a[0]) != a[1]) ok = false;
    cout << (ok ? "Yes" : "No") << endl;
  }
};
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  AXORCircle solver;
  solver.solve(in, out);
  return 0;
}
