#include <bits/stdc++.h>
using namespace std;
map<int, int> mark;
int value[100005], Max, num, n;
int slove() {
  num = 0;
  int i = Max;
  while (1) {
    if (i == 0) i = 2;
    if (num == n) break;
    if (mark[i])
      value[num++] = i, mark[i]--, i--;
    else if (mark[i + 2])
      value[num++] = i + 2, mark[i + 2]--, i = i + 1;
    else
      return 0;
  }
  if (value[n - 1] == Max - 1) return 1;
  return 0;
}
int main() {
  int a;
  while (scanf("%d", &n) != EOF) {
    mark.clear();
    Max = -1;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a), mark[a]++;
      if (a > Max) Max = a;
    }
    if (slove())
      printf("YES\n");
    else
      printf("NO\n");
  }
}
