#include <bits/stdc++.h>
using namespace std;
map<int, int> m1;
void remove(int ele) {
  m1[ele]--;
  if (m1[ele] == 0) {
    m1.erase(ele);
  }
  return;
}
int main() {
  int i, j, t1, t2, t3, t4, n, mini = 2e9, maxi = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &t1);
    m1[t1]++;
    mini = min(mini, t1);
    maxi = max(maxi, t1);
  }
  for (i = mini; i <= maxi; i++) {
    if (m1[i] == 0) {
      printf("NO\n");
      return 0;
    }
    remove(i);
  }
  for (i = maxi - 1; i >= mini + 1; i--) {
    if (m1[i] == 0) {
      printf("NO\n");
      return 0;
    }
    remove(i);
  }
  while (!m1.empty()) {
    auto it = m1.begin();
    t1 = it->first;
    t2 = t1 + 1;
    if (m1[t1] == 0 || m1[t2] == 0) {
      printf("NO\n");
      return 0;
    }
    remove(t1);
    remove(t2);
  }
  printf("YES\n");
  return 0;
}
