#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 3) {
    long long a, b, c;
    cin >> a >> b >> c;
    if (a ^ b == c && a ^ c == b) {
      cout << "Yes" << endl;
    } else
      cout << "No" << endl;
  } else if (n % 2 == 0) {
    cout << "No" << endl;
  } else {
    unordered_map<long long, int> um;
    for (int i = 0; i < n; ++i) {
      long long l;
      cin >> l;
      ++um[l];
    }
    if (um.size() == 2) {
      if (abs((*um.begin()).second - (*(++um.begin())).second) == 1) {
        cout << "Yes" << endl;
      } else
        cout << "No" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
