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