#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 2];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[0] = -(1 << 30);
  a[n + 1] = (1 << 30);
  sort(a, a + n + 3);
  a[0] = a[n];
  a[n + 1] = a[1];
  string ans = "Yes";
  for (int i = 1; i <= n; i++) {
    if ((a[i - 1] ^ a[i + 1]) ^ a[i]) {
      ans = "No";
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
