#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  map<int, int> m;
  for (int i = (0); i < (N); ++i) {
    cin >> a[i];
    if (m.find(a[i]) == m.end()) m.insert(make_pair(a[i], 0));
    ++m[a[i]];
  }
  int term1 = a[0];
  for (int i = (1); i < (N); ++i) {
    if (term1 == a[i] && i != 1) continue;
    int term2 = a[i];
    map<int, int> m2;
    m2.insert(make_pair(term1, 1));
    m2.insert(make_pair(term2, 1));
    int item = 2;
    while (item < N) {
      int term = term1 ^ term2;
      if (m.find(term) != m.end() &&
          (m2.find(term) == m2.end() || m2[term] < m[term])) {
        ++item;
        if (m2.find(term) == m2.end()) m2.insert(make_pair(term, 0));
        ++m2[term];
        term1 = term2;
        term2 = term;
      } else
        break;
    }
    if (item == N && a[0] == (term1 ^ term2)) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
