#include <bits/stdc++.h>
using namespace std;
long long n, m = 0, k;
vector<int> v;
map<int, int> mp;
int a[(200000 + 100)];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  if (n % 2 == 1) return cout << "NO", 0;
  sort(a, a + n);
  v.push_back(a[0]);
  for (int i = 1; i < n; i++)
    if (v.size() >= 1 && v.back() != a[i]) v.push_back(a[i]);
  int i = 0, j = 1, x = 0, y = 0;
  mp[v[0]]--;
  mp[v[1]] -= 2;
  if (mp[v[1]] < 0) {
    cout << "NO";
    return 0;
  }
  int l = v[1], r = v[1];
  while (j <= v.size() - 1) {
    x = mp[v[i]];
    y = mp[v[j]];
    if (v[j] - v[i] > 1) {
      cout << "NO";
      return 0;
    }
    if (x <= 0) {
      i = j;
      j++;
      continue;
    }
    if (y <= 0 && (l != v[j] && r != v[j])) {
      cout << "NO";
      return 0;
    }
    int p = min(x, y);
    if (p == 0) {
      if (abs(l - v[i]) == 1) {
        mp[v[i]]--;
        l = v[i];
      } else if (abs(r - v[i]) == 1) {
        mp[v[i]]--;
        r = v[i];
      }
      continue;
    }
    mp[v[i]] -= p;
    mp[v[j]] -= p;
    bool g = false, f = false;
    if (l == v[i] - 1) {
      f = true;
      l = v[j];
      p--;
    }
    if (r == v[i] - 1 && p) {
      g = true;
      r = v[j];
    }
    if (f && !g) {
      if (f && r == v[i] - 1 && p && !g) {
        r = v[i];
        p--;
      }
      if (f && l == v[i] - 1 && p && !g) l = v[i];
      p = 0;
    }
    if (g && !f) {
      if (g && r == v[i] - 1 && p && !f) {
        r = v[i];
        p--;
      }
      if (g && l == v[i] - 1 && p && !f) l = v[i];
      p = 0;
    }
  }
  j--;
  if (mp[v[j]] == 1) {
    if (abs(r - v[j]) == 1)
      r = v[j];
    else if (abs(l - v[j]) == 1)
      l = v[j];
  }
  if (abs(l - r) != 1) {
    cout << "NO";
    return 0;
  }
  cout << "YES";
}
