#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  vector<int> b = a;
  for (int i = 1; i < N; i++) {
    b = a;
    int one = a[0];
    b.erase(remove(b.begin(), b.end(), one), b.end());
    int two = a[i];
    b.erase(remove(b.begin(), b.end(), two), b.end());
    while (1) {
      int three = one ^ two;
      if (b.size() == 0) {
        if (three == a[0]) {
          cout << "Yes" << endl;
          return 0;
        } else {
          break;
        }
      }
      if (find(b.begin(), b.end(), three) != b.end()) {
        b.erase(remove(b.begin(), b.end(), three), b.end());
        one = two;
        two = three;
      } else {
        break;
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
