#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(n);
  map<int, int> cnt;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]), cnt[a[i]]++;
  sort(a.begin(), a.end());
  vector<int> ans(n);
  ans[0] = a[0];
  cnt[a[0]]--;
  for (int i = 1; i < n; i++) {
    if (cnt[ans[i - 1] + 1])
      ans[i] = ans[i - 1] + 1, cnt[ans[i]]--;
    else if (cnt[ans[i - 1] - 1])
      ans[i] = ans[i - 1] - 1, cnt[ans[i]]--;
    else
      return puts("NO");
  }
  puts((abs(ans[0] - ans.back()) == 1) ? "YES" : "NO");
  return 0;
}
