#include <bits/stdc++.h>
using namespace std;
int perles[100005];
int pos[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &perles[i]);
  sort(perles, perles + n);
  pos[0] = 1;
  int nPos = 0;
  for (int i = 1; i < n; i++) {
    if (perles[i] == perles[i - 1]) {
      pos[nPos]++;
    } else {
      if (perles[i] != perles[i - 1] + 1) {
        printf("NO\n");
        return 0;
      }
      nPos++;
      pos[nPos] = 1;
    }
  }
  nPos++;
  for (int i = 1; i < nPos; i++) {
    int k = i;
    if (k > 0 && pos[k] > 2 && pos[k - 1] > 1) {
      i--;
      pos[k]++;
    }
    while (k > 0 && pos[k] > 2 && pos[k - 1] > 1) {
      pos[k] -= 2;
      k--;
    }
    pos[k]--;
  }
  for (int i = nPos - 2; i >= 0; i--) {
    if (pos[i] == 0) {
      printf("NO\n");
      return 0;
    }
    int k = i;
    if (k < nPos - 1 && pos[k] >= 2 && pos[k + 1] >= 1) {
      i++;
      pos[k]++;
    }
    while (k < nPos - 1 && pos[k] >= 2 && pos[k + 1] >= 1) {
      pos[k] -= 2;
      k++;
    }
    pos[k]--;
    ;
  }
  for (int i = 0; i < nPos; i++) {
    if (pos[i] != 0) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
