#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[100005];
int b[100005][2];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  int ind = 0;
  m = 0;
  while (ind < n) {
    int cnt = 1;
    while (ind < n && a[ind + 1] == a[ind]) {
      ind++;
      cnt++;
    }
    b[m][0] = a[ind];
    b[m++][1] = cnt;
    ind++;
  }
  if (m == 1) {
    printf("NO\n");
    return 0;
  }
  for (int i = 0; i < m - 1; i++) {
    if (b[i][0] + 1 != b[i + 1][0]) {
      printf("NO\n");
      return 0;
    }
  }
  int need = 0;
  for (int i = 0; i < m; i++) {
    if (i == m - 1) {
      if (need == b[i][1])
        printf("YES\n");
      else
        printf("NO\n");
      return 0;
    }
    if (b[i][1] < need) {
      printf("NO\n");
      return 0;
    }
    need = b[i][1] - need;
    if (need == 0) {
      printf("NO\n");
      return 0;
    }
  }
  return 0;
}
