#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char *argv[]) {
  uint32_t N;
  cin >> N;
  uint32_t *a = new uint32_t[N];
  bool *isUse_a = new bool[N];
  for (uint32_t i = 0; i < N; i++) {
    cin >> a[i];
    isUse_a[i] = false;
  }
  uint32_t *ring = new uint32_t[N];
  ring[0] = 0;
  isUse_a[0] = true;
  {
    bool hit = false;
    uint32_t left = a[ring[0]];
    for (uint32_t r = 1; r < N - 1; r++) {
      uint32_t right = a[r];
      uint32_t exor = left ^ right;
      for (uint32_t m = 1; m < N; m++) {
        if (r == m) {
          continue;
        }
        uint32_t middle = a[m];
        if (exor == middle) {
          ring[1] = m;
          ring[2] = r;
          isUse_a[m] = true;
          isUse_a[r] = true;
          hit = true;
          break;
        }
      }
      if (hit) {
        break;
      }
    }
    if (!hit) {
      cout << "No" << endl;
      return 0;
    }
  }
  {
    for (uint32_t ringId = 3; ringId < N; ringId++) {
      uint32_t left = a[ring[ringId - 2]];
      uint32_t middle = a[ring[ringId - 1]];
      bool hit = false;
      for (uint32_t i = 1; i < N; i++) {
        if (isUse_a[i]) {
          continue;
        }
        uint32_t right = a[i];
        if ((left ^ right) == middle) {
          ring[ringId] = i;
          isUse_a[i] = true;
          hit = true;
          break;
        }
      }
      if (!hit) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  delete[] a;
  delete[] isUse_a;
  return 0;
}
