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