#include <bits/stdc++.h>
using namespace std;
bool search(int i, int a[], int N) {
  if (i == N - 1) {
    if (a[N - 1] == (a[N - 2] ^ a[0]) and a[0] == (a[N - 1] ^ a[1])) {
      return true;
    } else {
      return false;
    }
  }
  for (int j = i + 1; j < N; ++j) {
    if (a[i] == (a[i - 1] ^ a[j])) {
      swap(a[i + 1], a[j]);
      return search(i + 1, a, N);
    }
  }
  return false;
}
int main(void) {
  int N;
  int a[100000];
  cin >> N;
  for (int i = 0; i < N; ++i) {
    cin >> a[i];
  }
  for (int i = 1; i < N; ++i) {
    swap(a[1], a[i]);
    if (search(1, a, N)) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
