#include <bits/stdc++.h>
using namespace std;
long long n, a;
map<long long, long long> m;
signed main() {
  cin >> n;
  for (long long i = 0; i < (long long)(n); ++i) cin >> a, m[a]++;
  if (m.size() == 1) {
    if (m[0])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else if (m.size() == 2) {
    auto itr = m.begin();
    if (itr->first == 0 && itr->second * 2 == (++itr)->second)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else if (m.size() == 3) {
    auto itr = m.begin();
    if ((itr->second == (++itr)->second) && (itr->second == (++itr)->second))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else
    cout << "No" << endl;
}
