#include <bits/stdc++.h>
using namespace std;
map<long long, long long> numbers;
long long n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    numbers[a]++;
  }
  map<long long, long long>::iterator it = numbers.begin(), it1;
  vector<long long> v;
  v.push_back((*it).first);
  numbers[(*it).first]--;
  for (int i = 1; i < n; i++) {
    it1 = it;
    it1++;
    if (it1 != numbers.end()) {
      if ((*it1).first - v.back() > 1) {
        cout << "NO\n";
        return 0;
      }
      if ((*it1).second > 0) {
        v.push_back((*it1).first);
        numbers[(*it1).first]--;
        it = it1;
        continue;
      }
    }
    if (it != numbers.begin()) {
      it1 = it;
      it1--;
      if (v.back() - (*it1).first > 1) {
        cout << "NO\n";
        return 0;
      }
      if ((*it1).second > 0) {
        v.push_back((*it1).first);
        numbers[(*it1).first]--;
        it = it1;
        continue;
      }
    }
  }
  if (v.size() < n) {
    cout << "NO\n";
    return 0;
  }
  if (abs(v.back() - v[0]) != 1) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  return 0;
  return 0;
}
