#include <bits/stdc++.h>
using namespace std;
int a[200010];
int base;
int n, tmp;
int main() {
  cin >> n;
  cin >> base;
  a[100000]++;
  for (int i = 1; i <= n - 1; i++) {
    cin >> tmp;
    int offset = tmp - base;
    if (abs(offset) > 100000) {
      cout << "NO" << endl;
      return 0;
    }
    a[offset + 100000]++;
  }
  int ub = 100000, lb = 100000;
  int cnt = n + a[100000];
  while (a[ub]) {
    cnt -= a[ub];
    ub++;
  }
  while (a[lb]) {
    cnt -= a[lb];
    lb--;
  }
  lb++;
  ub--;
  if (cnt != 0) {
    cout << "NO";
    return 0;
  }
  for (int i = lb + 1; i <= ub - 1; i++) {
    if (a[i] < 2) {
      cout << "NO";
      return 0;
    }
    a[i] -= 2;
  }
  a[lb]--;
  a[ub]--;
  for (int i = lb; i <= ub; i++) {
    if (a[i + 1] < a[i]) {
      cout << "NO";
      return 0;
    }
    a[i + 1] -= a[i];
  }
  cout << "YES";
}
