#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n, a[N];
bool check(int b[]) {
  for (int i = 0; i < n; i++)
    if ((b[i] ^ b[(i + 2) % n]) != b[(i + 1) % n]) return 0;
  cout << "Yes";
  exit(0);
}
void rec(int x, int b[]) {
  if (__builtin_popcount(x) == n)
    check(b);
  else {
    int mp = __builtin_popcount(x);
    for (int i = 0; i < n; i++) {
      if ((x & (1 << i)) == 0) {
        b[mp] = a[i + 1];
        rec((x ^ (1 << i)), b);
        b[mp] = 0;
      }
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  if (n < 10) {
    int c[20] = {};
    rec(0, c);
  }
  sort(a + 1, a + n + 1);
  if (a[1] == 0 && a[n] == 0) {
    cout << "Yes";
    return 0;
  }
  cout << "No";
  return 0;
}
