#include <bits/stdc++.h>
using namespace std;
int camel(vector<int> a, int two, int one) {
  if (a.size() == 0) return two ^ one;
  int now = two ^ one;
  for (int i = 0; i < a.size(); i++) {
    if (a.at(i) == now) {
      a.at(i) = a.back();
      a.pop_back();
      int sol = camel(a, one, now);
      if (sol != 0) return sol;
    }
  }
  return 0;
}
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a.at(i);
  for (int i = 1; i < N - 1; i++) {
    vector<int> a2 = a;
    a2.at(0) = a2.back();
    a2.pop_back();
    a2.at(i) = a2.back();
    a2.pop_back();
    if (camel(a2, a.at(0), a.at(i)) == a.at(0)) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
