#include <bits/stdc++.h>
using namespace std;
const long long N = 1e7 + 1;
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (long long i = 1; i < n - 1; i++) {
    if (a[i] != (a[i - 1] ^ a[i + 1])) {
      cout << "No";
      return 0;
    }
  }
  if (a[0] != (a[n - 1] ^ a[1]) || a[n - 1] != (a[n - 2] ^ a[0])) {
    cout << "No";
    return 0;
  }
  cout << "Yes";
}
