#include <bits/stdc++.h>
using namespace std;
int n, minnum, maxnum;
int d[100100], cnt[100100];
void print(bool op) {
  if (op)
    printf("YES\n");
  else
    printf("NO\n");
}
int main() {
  scanf("%d", &n);
  minnum = 1 << 30, maxnum = -1 << 30;
  for (int i = 0; i < n; i++) {
    scanf("%d", &d[i]);
    minnum = min(minnum, d[i]);
    maxnum = max(maxnum, d[i]);
  }
  if (maxnum - minnum >= n) {
    print(false);
    return 0;
  }
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < n; i++) {
    d[i] -= minnum;
    cnt[d[i]]++;
  }
  bool ans = true;
  if (cnt[1] < 2)
    print(false);
  else {
    cnt[0]--;
    cnt[1] -= 2;
    queue<int> q;
    q.push(1);
    q.push(1);
    while (!q.empty()) {
      int now = q.front();
      q.pop();
      if (now - 1 >= 0 && cnt[now - 1]) {
        cnt[now - 1]--;
        q.push(now - 1);
      } else if (cnt[now + 1]) {
        cnt[now + 1]--;
        q.push(now + 1);
      } else if (q.size() == 1 && abs(q.front() - now) == 1) {
        q.pop();
      } else {
        ans = false;
        break;
      }
    }
    for (int i = 0; i <= maxnum - minnum; i++)
      if (cnt[i]) {
        ans = false;
        break;
      }
    print(ans);
  }
  return 0;
}
