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