#include <bits/stdc++.h>
using namespace std;
map<int, int> c;
int n;
vector<int> ans(0);
int main() {
  scanf("%d", &n);
  int mn = 1000000000;
  for (int(i) = 0; (i) < (n); ++(i)) {
    int first;
    scanf("%d", &first);
    c[first]++;
    mn = min(mn, first);
  }
  int cur = mn - 1;
  for (int(i) = 0; (i) < (n); ++(i)) {
    if (c[cur + 1] > 0) {
      ans.push_back(cur + 1);
      c[cur + 1]--;
      cur++;
    } else if (c[cur - 1] > 0) {
      ans.push_back(cur - 1);
      c[cur - 1]--;
      cur--;
    } else {
      cout << "NO\n";
      return 0;
    }
  }
  if (ans.back() == mn + 1)
    cout << "YES\n";
  else
    cout << "NO\n";
}
