#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100005], f = 0;
  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])
      f = 1;
    else {
      f = 0;
      break;
    }
  }
  if (a[0] ^ a[n - 1] != a[1]) f = 0;
  if (f == 0)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
