#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  std::list<unsigned int> a;
  std::vector<bool> is_used(N);
  for (int i = 0; i < N; ++i) {
    unsigned int tmp = 0;
    cin >> tmp;
    a.push_back(tmp);
  }
  a.sort();
  std::list<unsigned int> a_tmp;
  auto it2 = a.begin();
  auto it2_end = a.end();
  unsigned int start = *it2;
  it2++;
  for (; it2 != it2_end; ++it2) {
    a_tmp.clear();
    {
      auto it3 = a.begin();
      auto it3_end = a.end();
      it3++;
      for (; it3 != it3_end; ++it3) {
        if (it3 != it2) {
          a_tmp.push_back(*it3);
        }
      }
    }
    unsigned int prev = start;
    unsigned int now = *it2;
    unsigned int next = prev ^ now;
    for (int k = 0; k < N - 2; ++k) {
      bool is_found = false;
      for (auto it = a_tmp.begin(), it_end = a_tmp.end(); it != it_end; ++it) {
        if (next == *it) {
          prev = now;
          now = next;
          a_tmp.erase(it);
          is_found = true;
          break;
        }
      }
      if (false == is_found) {
        break;
      }
      if (k == N - 3) {
        cout << "Yes";
        return 0;
      }
    }
    unsigned int now_tryed = *it2;
    while (now_tryed == *it2) {
      it2++;
      if (it2 == it2_end) {
        cout << "No";
        return 0;
      }
    }
  }
  cout << "No";
  return 0;
}
