#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  scanf("%d", &n);
  map<int, int> a;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    a[x]++;
  }
  map<int, int>::iterator it = a.begin();
  int last = a.begin()->first;
  int deg = a.begin()->second * 2;
  ++it;
  int flag = 0;
  while (it != a.end()) {
    if (it->first != last + 1 || deg == 0) flag = 1;
    deg = it->second * 2 - deg;
    if (deg < 0) flag = 1;
    last = it->first;
    ++it;
  }
  if (deg) flag = 1;
  if (flag)
    puts("NO");
  else
    puts("YES");
  return 0;
}
