#include <bits/stdc++.h>
using namespace std;
int main(void) {
  cin.sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> As(N);
  multiset<int> ms_orig;
  for (int n = 0; n < (int)(N); ++n) {
    cin >> As[n];
    ms_orig.insert(As[n]);
  }
  auto a0_orig = As[0];
  bool ans = false;
  for (int i = (1); i < (int)(N); ++i) {
    auto a0 = a0_orig;
    auto a1 = As[i];
    auto ms = ms_orig;
    bool fail = false;
    auto a2 = 0;
    for (int rep = 0; rep < (int)(N - 2); ++rep) {
      a2 = a0 ^ a1;
      if (ms.count(a2)) {
        a0 = a1;
        a1 = a2;
        ms.erase(a2);
      } else {
        fail = true;
        break;
      }
    }
    if (fail == false && (a0_orig == (As[i] ^ a2))) {
      ans = true;
      break;
    }
  }
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
