#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll infl = 10000000000000000LL;
constexpr int inf = 1000000000;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  set<int> c;
  int x = 0;
  for (int i = 0; i < N; ++i) {
    cin >> a[i];
    x ^= a[i];
    c.insert(a[i]);
  }
  if (N == 3) {
    cout << (x == 0 ? "Yes" : "No") << endl;
  } else {
    sort(a.begin(), a.end());
    for (int i = 0; i < N; ++i) {
      if (c.count(x ^ a[i])) {
        cout << "Yes" << endl;
        return 0;
      }
    }
    cout << "No" << endl;
  }
  return 0;
}
