#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 3;
int a[maxn], b[maxn];
map<int, int> mp;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    mp[a[i]]++;
  }
  sort(a + 1, a + 1 + n);
  if (n == 1 || (n == 2 && abs(a[1] - a[2]) == 1)) {
    printf("YES");
    return 0;
  }
  int flag = 0;
  b[1] = a[1];
  mp[a[1]]--;
  for (int i = 2; i <= n; i++) {
    if (mp[b[i - 1] + 1]) {
      b[i] = b[i - 1] + 1;
      mp[b[i - 1] + 1]--;
    } else if (mp[b[i - 1] - 1]) {
      b[i] = b[i - 1] - 1;
      mp[b[i - 1] - 1]--;
    } else {
      flag = 1;
      break;
    }
  }
  if (flag || abs(b[1] - b[n]) != 1)
    printf("NO");
  else
    printf("YES");
  return 0;
}
