#include <bits/stdc++.h>
using namespace std;
map<int, int> M;
int main() {
  int n;
  while (cin >> n) {
    for (int i = 0; i < n; i++) {
      int tmp;
      cin >> tmp;
      M[tmp]++;
    }
    map<int, int>::iterator it = M.begin();
    int k = (*it).first;
    n--;
    M[k]--;
    int w = k;
    while (1) {
      bool ok = 0;
      if (M[k + 1] > 0) {
        M[k + 1]--;
        k = k + 1;
        ok = 1;
        n--;
      } else if (M[k - 1] > 0) {
        M[k - 1]--;
        k = k - 1;
        ok = 1;
        n--;
      }
      if (!ok) break;
    }
    if (n == 0 && abs(k - w) == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
