#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::vector<unsigned int> tryeda(N);
  int tryed_num = 0;
  for (int i = 1; i < N - 1; ++i) {
    bool contineu_i = false;
    for (int tmp = 0; tmp < tryed_num; ++tmp) {
      if (tryeda[tmp] == a[i]) {
        contineu_i = true;
        break;
      }
    }
    if (true == contineu_i) {
      continue;
    }
    for (int j = i + 1; j < N; ++j) {
      if (a[0] == a[i] ^ a[j]) {
        if (N == 3) {
          cout << "Yes";
          return 0;
        }
        for (int tmp = 0; tmp < N; ++tmp) {
          is_used[tmp] = false;
        }
        is_used[0] = true;
        is_used[i] = true;
        is_used[j] = true;
        unsigned int prev = a[0];
        unsigned int now = a[i];
        unsigned int next = prev ^ now;
        bool not_found = false;
        for (int tmp = 0; tmp < N - 3; ++tmp) {
          next = prev ^ now;
          for (int k = 0; k < N; ++k) {
            if (is_used[k] == false && a[k] == next) {
              is_used[k] = true;
              prev = a[i];
              now = a[k];
              break;
            }
            if (k == N - 1) {
              not_found = true;
            }
          }
          if (true == not_found) {
            break;
          }
          if (tmp == N - 4) {
            cout << "Yes";
            return 0;
          }
        }
        tryeda[tryed_num] = a[i];
        tryed_num++;
        tryeda[tryed_num] = a[j];
        tryed_num++;
        j = N + 1;
      }
    }
  }
  cout << "No";
  return 0;
}
