#include <bits/stdc++.h>
using namespace std;
static const long long MOD = 1e9 + 7;
long long a[100002];
int main() {
  long long N;
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> a[i];
  sort(a + 1, a + N);
  a[0] = a[N];
  a[N + 1] = a[1];
  bool ok = true;
  for (int i = 1; i <= N; i++) {
    ok &= ((a[i - 1] ^ a[i + 1]) == a[i]);
  }
  cout << ((ok) ? "Yes" : "No") << endl;
  return 0;
}
