#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  long long int arr[n + 1];
  map<long long int, long long int> mp;
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
    mp[arr[i]]++;
  }
  if (n == 3) {
    if ((arr[0] ^ arr[1]) == arr[2]) {
      cout << "Yes" << '\n';
    } else {
      cout << "No" << '\n';
    }
  } else {
    if (mp.size() > (n / 2)) {
      cout << "No" << '\n';
    } else {
      cout << "Yes" << '\n';
    }
  }
}
