#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  std::vector<unsigned int> a(N);
  std::vector<bool> is_used(N);
  for (int i = 0; i < N; ++i) {
    cin >> a[i];
  }
  std::list<unsigned int> a_tmp;
  std::list<unsigned int> ng_list;
  for (int j = 1; j < N; ++j) {
    bool is_skip = false;
    for (const auto& it : ng_list) {
      if (it == a[j]) {
        is_skip = true;
        break;
        ;
      }
    }
    if (is_skip) {
      continue;
    }
    for (int i = 1; i < N; ++i) {
      if (i != j) {
        a_tmp.push_back(a[i]);
      }
    }
    unsigned int prev = a[0];
    unsigned int now = a[j];
    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;
      }
    }
    ng_list.push_back(a[j]);
  }
  cout << "No";
  return 0;
}
