#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  vector<bool> used(N);
  vector<int> xor_v(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  xor_v[0] = a[0];
  used[0] = true;
  bool found_flag = false;
  for (int i = 1; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if ((a[0] ^ a[j]) == a[i]) {
        xor_v[1] = a[i];
        xor_v[2] = a[j];
        used[i] = true;
        used[j] = true;
        found_flag = true;
        break;
      }
    }
    if (found_flag) break;
  }
  if (!found_flag) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 2; i < N - 1; i++) {
    found_flag = false;
    for (int j = 0; j < N; j++) {
      if (!used[j]) {
        if ((xor_v[i - 1] ^ a[j]) == xor_v[i]) {
          xor_v[i + 1] = a[j];
          used[j] = true;
          found_flag = true;
          break;
        }
      }
    }
    if (!found_flag) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
