#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  cin.sync_with_stdio(false);
  solve();
  return 0;
}
long long cnt[30];
int let[30];
const int maxlen = 101010;
map<int, int> m;
void solve() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    m[x]++;
  }
  while (m.size() > 2) {
    if (m[m.begin()->first + 1] < m.begin()->second + 1) {
      cout << "NO";
      return;
    }
    m[m.begin()->first + 1] -= m.begin()->second;
    m.erase(m.begin());
  }
  if (m.size() == 2 && m[m.begin()->first + 1] == m.begin()->second) {
    cout << "YES";
  } else
    cout << "NO";
}
