#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<long long int> a(N), a_uni(N), a_cnt(100001, 0);
  for (int i = 0; i < (int)(N); i++) {
    cin >> a[i];
    a_uni[i] = a[i];
    a_cnt[a[i]]++;
  }
  sort(a_uni.begin(), a_uni.end());
  decltype(a_uni)::iterator result = unique(a_uni.begin(), a_uni.end());
  a_uni.erase(result, a_uni.end());
  if (a_uni.size() == 1) {
    if (a_uni[0] != 0) {
      cout << "No" << endl;
    } else {
      cout << "Yes" << endl;
    }
  } else if (a_uni.size() == 2) {
    if (a_uni[0] == 0) {
      if (a_cnt[a_uni[1]] == a_cnt[0] * 2) {
        cout << "Yes" << endl;
      } else {
        cout << "No" << endl;
      }
    } else {
      cout << "No" << endl;
    }
  } else if (a_uni.size() == 3 && a_cnt[0] == 0) {
    if (a_cnt[a_uni[0]] == a_cnt[a_uni[1]] &&
        a_cnt[a_uni[1]] == a_cnt[a_uni[2]]) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    cout << "No" << endl;
  }
  return 0;
}
