#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  multiset<int> s;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    s.insert(x);
  }
  int cur = *s.begin();
  while (1) {
    if (s.find(cur + 1) != s.end()) {
      cur++;
      s.erase(s.find(cur));
    } else if (s.find(cur - 1) != s.end()) {
      cur--;
      s.erase(s.find(cur));
    } else
      break;
  }
  printf("%s\n", s.empty() ? "YES" : "NO");
}
