#include <bits/stdc++.h>
using namespace std;
const int MAX = 100000 + 10;
int a[MAX];
deque<int> ans;
map<int, int> cnt;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  sort(a, a + n);
  ans.push_back(a[0]);
  cnt[a[0]]--;
  for (int i = 1; i < n; i++) {
    int cur = ans.back();
    int tmp = ans.front();
    if (cnt[cur + 1] > 0) {
      cnt[cur + 1]--;
      ans.push_back(cur + 1);
      continue;
    } else if (cnt[cur - 1] > 0) {
      cnt[cur - 1]--;
      ans.push_back(cur - 1);
      continue;
    } else if (cnt[tmp + 1] > 0) {
      cnt[tmp + 1]--;
      ans.push_front(tmp + 1);
      continue;
    } else if (cnt[tmp - 1] > 0) {
      cnt[tmp - 1]--;
      ans.push_front(tmp - 1);
      continue;
    } else {
      cout << "NO\n";
      return 0;
    }
  }
  if (abs(ans.front() - ans.back()) != 1) {
    cout << "NO\n";
  } else
    cout << "YES\n";
}
