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