#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int a[100001];
  int b[100001];
  bool c[100001];
  for (int i = 0; i < N; i++) b[i] = 0;
  for (int i = 0; i < N; i++) c[i] = false;
  for (int i = 0; i < N; i++) cin >> a[i];
  int x = 0;
  for (int i = 0; i < N; i++) x ^= a[i];
  if (x != 0) {
    cout << "No" << endl;
    return 0;
  }
  b[0] = a[0];
  c[0] = true;
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      if (c[j] == false) {
        for (int k = j + 2; k < N; k++) {
          if (c[k] == false) {
            if (b[i] ^ a[j] == a[k]) {
              b[i + 1] = a[k];
              b[i + 2] = a[j];
              c[k] = true;
              c[j] = true;
            }
          }
        }
      }
    }
  }
  for (int i = 0; i < N; i++) {
    if (c[i] == false) {
      cout << "No" << endl;
      return 0;
    }
  }
  if (b[0] ^ b[N - 2] == b[N - 1]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
