#include <bits/stdc++.h>
using namespace std;
void rf() {}
const int nx[8] = {2, -2, -2, 2, 1, 1, -1, -1};
const int ny[8] = {1, 1, -1, -1, 2, -2, -2, 2};
const int Nx[4] = {0, 0, -1, 1};
const int Ny[4] = {1, -1, 0, 0};
const long long LINF = (long long)5e18;
const int INF = 1e9 + 7;
const int N = 6e5 + 1;
const int MAXN = 1e6 + 50;
const double EPS = 1e-9, PI = 3.14159265359;
inline int get_int() {
  char x = getchar();
  int ret = 0;
  bool neg = 0;
  while (!('0' <= x && x <= '9')) {
    if (x == '-') neg = 1;
    x = getchar();
  }
  while ('0' <= x && x <= '9') {
    ret = ret * 10 + x - '0';
    x = getchar();
  }
  if (neg) ret *= -1;
  return ret;
}
int n;
int a[N];
multiset<int> second;
int take(int x) {
  if (second.find(x - 1) != second.end()) return x - 1;
  if (second.find(x + 1) != second.end()) return x + 1;
  return -1;
}
int main() {
  srand(time(0));
  rf();
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i], second.insert(a[i]);
  a[0] = *second.begin();
  second.erase(second.begin());
  for (int l = 1, r = n - 1; l <= r; l++, r--) {
    a[l] = a[r] = -1;
    a[l] = take(a[l - 1]);
    if (a[l] == -1) {
      cout << "NO";
      return 0;
    }
    second.erase(second.find(a[l]));
    if (l < r) {
      a[r] = take(a[(r + 1) % n]);
      if (a[r] == -1) {
        cout << "NO";
        return 0;
      }
      second.erase(second.find(a[r]));
    }
  }
  for (int i = 0; i < n; i++) {
    if (abs(a[i] - a[(i + 1) % n]) != 1) {
      cout << "NO";
      return 0;
    }
  }
  for (int i = 0; i < n; i++) cerr << a[i] << " \n"[i == n - 1];
  cout << "YES";
  return 0;
}
