#include <bits/stdc++.h>
using namespace std;
const int size = 111110;
long long n, m, L, s, t;
multiset<int> S;
int work(int sta) {
  int idx = *S.begin();
  if (S.size() == 1) return idx == sta + 1;
  if (abs(idx - sta) == 1) {
    S.erase(S.begin());
    return work(idx);
  }
  if (S.find(sta + 1) != S.end()) {
    S.erase(S.find(sta + 1));
    return work(sta + 1);
  }
  return 0;
}
int main() {
  cin >> n;
  while (n--) {
    cin >> s;
    S.insert(s);
  }
  int sta = *S.begin();
  auto end = S.end();
  end--;
  int flag = 1;
  if (*end - sta > 1e6) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = sta; i < *end; i++) {
    if (S.find(i) == S.end())
      flag = 0;
    else
      S.erase(S.find(i));
  }
  if (flag && work(sta))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
