#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  if (argc == 2 && ((string)argv[1]) == "USE_IO_FILES")
    freopen("in.txt", "r", stdin), freopen("out.txt", "w", stdout);
  int N;
  while (scanf("%d", &N) != EOF) {
    multiset<int> ms;
    bool valid = ms.size() % 2 == 0;
    for (int i = int(0); i < int(N); i++) {
      int t;
      scanf("%d", &t);
      ms.insert(t);
    }
    int v1 = *ms.begin();
    int v2 = *ms.rbegin();
    if (v1 == v2) valid = false;
    int c = v1;
    while (c < v2) {
      auto it = ms.find(c);
      if (it == ms.end()) {
        valid = false;
        break;
      } else
        ms.erase(it);
      c++;
    }
    while (c > v1) {
      auto it = ms.find(c);
      if (it == ms.end()) {
        valid = false;
        break;
      } else
        ms.erase(it);
      c--;
    }
    while (valid && ms.size()) {
      auto tt = ms.begin();
      auto it = ms.find(*tt + 1);
      if (it != ms.end()) {
        ms.erase(it);
        ms.erase(tt);
      } else
        valid = false;
    }
    if (valid)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
