#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
void Main() {
  ll n;
  cin >> n;
  vector<ll> V(n);
  for (int i = 0; i < (int)(n); ++i) cin >> V.at(i);
  vector<ll> A(n);
  A.at(0) = V.at(0);
  for (int i = 0; i < (int)(n - 2); ++i) {
    bool flag;
    flag = false;
    for (int j = 0; j < (int)(n - 1); ++j) {
      if (V.at(j) == -1) continue;
      for (int k = 0; k < (int)(n); ++k) {
        if (V.at(k) == -1) continue;
        if ((A.at(i) ^ V.at(j)) == V.at(k)) {
          A.at(i + 1) = V.at(k);
          A.at(i + 2) = V.at(j);
          V.at(k) = -1;
          V.at(j) = -1;
          flag = true;
        }
      }
    }
    if (flag == false) {
      cout << "No" << endl;
      return;
    }
  }
  if ((A.at(1) ^ A.at(n - 1)) == A.at(0))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  Main();
}
