#include <bits/stdc++.h>
const int N = 100001;
int n, mi, mx, a[N], d[N];
bool solve() {
  int i;
  if (mx - mi >= N) return 0;
  for (i = 0; i < n; i++) d[a[i] - mi]++;
  mx -= mi;
  d[0]--;
  d[mx]--;
  for (i = 1; i < mx; i++) {
    if (d[i] < 2) return 0;
    d[i] -= 2;
  }
  for (i = 0; i < mx; i++) {
    if (d[i + 1] < d[i]) return 0;
    d[i + 1] -= d[i];
  }
  if (d[mx]) return 0;
  return 1;
}
int main() {
  scanf("%d", &n);
  scanf("%d", &a[0]);
  mi = mx = a[0];
  for (int i = 1; i < n; i++) {
    scanf("%d", &a[i]);
    if (mi > a[i]) mi = a[i];
    if (mx < a[i]) mx = a[i];
  }
  printf(solve() ? "YES\n" : "NO\n");
  return 0;
}
