#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int MAX = 1e5 + 5;
const long long MOD = 1000000007;
const long long MOD2 = 2010405347;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
const int block = 555;
int n, x[MAX], cnt[MAX], nw, lp, hit;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> x[i];
  sort(x + 1, x + 1 + n);
  for (int i = 2; i <= n; ++i)
    if (x[i] - x[i - 1] > 1) return cout << "NO\n", 0;
  for (int i = 1; i <= n; ++i) cnt[x[i] - x[1]]++;
  if (!cnt[1]) return cout << "NO\n", 0;
  --cnt[1], nw = hit = 1;
  while (1) {
    if (cnt[nw] == 0) break;
    if (cnt[nw - 1] > 1) {
      --cnt[nw - 1];
      --cnt[nw];
    } else {
      if (!cnt[nw + 1]) return cout << "NO\n", 0;
      ++nw;
      --cnt[nw];
    }
  }
  bool st = 0;
  for (int i = 0; i <= n; ++i) {
    if (cnt[i]) {
      if (cnt[i] != 1 || st) return cout << "NO\n", 0;
    } else
      st = 1;
  }
  cout << "YES\n";
  return 0;
}
