#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int *mn, *mx;
  mn = min_element(a, a + n);
  mx = max_element(a, a + n);
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    if (m[a[i]] >= 1)
      m[a[i]]++;
    else
      m[a[i]] = 1;
  }
  int f = 0, pre1, pre2, fir = 0;
  for (auto x : m) {
    if (fir == 0) {
      pre1 = x.first;
      pre2 = x.second;
      if (pre2 > 1) {
        f = 1;
        break;
      }
      fir = 1;
    } else {
      if ((x.first - (pre1)) > 1) {
        f = 1;
        break;
      } else {
        if (x.second > 1) {
          f = 1;
          break;
        } else {
          pre1 = x.first;
          pre2 = x.second;
        }
      }
    }
  }
  if (f == 1)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
