#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, c = 0, k;
  cin >> n;
  int a[n + 1];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    for (j = 0; j < n && j != i; j++) {
      for (k = 0; k < n && k != i && k != j; k++) {
        if ((a[j] ^ a[k]) != a[i]) {
          c = 1;
          break;
        }
      }
      if (c == 1) break;
    }
    if (c == 1) break;
  }
  if (c == 1)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
