#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < (n); ++i) {
    cin >> v[i];
  }
  long long x;
  if (n % 3 != 2) {
    x = 0;
    for (int i = 0; i < (n); ++i) {
      x ^= v[i];
    }
    if (n % 3 == 0) {
      if (x == 0)
        cout << "Yes";
      else
        cout << "No";
    }
    if (n % 3 == 1) {
      for (int i = 0; i < (n); ++i) {
        if (x == v[i]) {
          cout << "Yes";
          return 0;
        }
      }
      cout << "No";
    }
    return 0;
  }
  x = 0;
  for (int i = 0; i < (n - 1); ++i) {
    x ^= v[i];
  }
  long long removed = 0;
  for (int i = 0; i < (n); ++i) {
    if (v[i] != 0) {
      removed = i;
      break;
    }
  }
  for (int i = 0; i < (n); ++i) {
    if (i == removed) continue;
    if (x ^ v[i] == v[removed]) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
