#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]" << endl; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const int N = 100005;
int a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    mp[x]++;
  }
  if (mp.size() == 1) {
    cout << "NO";
    return 0;
  }
  auto it1 = mp.begin();
  auto it2 = it1;
  ++it2;
  int x1 = it1->first;
  int x2 = it2->first;
  a[0] = x1;
  a[n - 1] = x2;
  if (x2 - x1 != 1) {
    cout << "NO";
    return 0;
  }
  if (mp[x1] == 1)
    mp.erase(x1);
  else
    mp[x1]--;
  if (mp[x2] == 1)
    mp.erase(x2);
  else
    mp[x2]--;
  int l = 1;
  int r = n - 2;
  while ((int)(mp.size())) {
    auto it = mp.begin();
    int x = it->first;
    if (abs(x - a[l - 1]) == 1) {
      a[l] = x;
      l++;
      if (it->second == 1)
        mp.erase(it);
      else
        it->second--;
    } else if (abs(x - a[r + 1]) == 1) {
      a[r] = x;
      r--;
      if (it->second == 1)
        mp.erase(it);
      else
        it->second--;
    } else {
      ++it;
      if (it == mp.end()) break;
      int y = it->first;
      if (abs(y - a[l - 1]) == 1) {
        a[l] = y;
        l++;
        if (it->second == 1)
          mp.erase(it);
        else
          it->second--;
      } else if (abs(y - a[r + 1]) == 1) {
        a[r] = y;
        r--;
        if (it->second == 1)
          mp.erase(it);
        else
          it->second--;
      } else
        break;
    }
  }
  bool p = false;
  for (int i = 1; i < n; i++)
    if (abs(a[i] - a[i - 1]) != 1) p = true;
  if ((int)(mp.size()) || p)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
