#include <bits/stdc++.h>
using namespace std;
int a[100001], n, null[100001] = {};
int c[100001];
void dfs(int dep, int b[]) {
  if (dep == n + 1) {
    int ok = 1;
    for (int i = 1; i <= n; i++) {
      if (i < n)
        c[i] = b[i] ^ b[i + 1];
      else
        c[i] = b[i] ^ b[1];
    }
    sort(b + 1, b + 1 + n);
    sort(c + 1, c + 1 + n);
    for (int i = 1; i <= n; i++) {
      if (b[i] != c[i]) ok = 0;
    }
    if (ok) {
      cout << "Yes" << endl;
      exit(0);
    }
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (b[i] == 0) {
      b[i] = a[dep];
      dfs(dep + 1, b);
      b[i] = 0;
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  dfs(1, null);
  cout << "No" << endl;
  return 0;
}
