#include <bits/stdc++.h>
using namespace std;
 
long long int N, a[114514], m, c, i;
 
int main(){
    scanf("%lld", &N);
    for(; i < N; ++i){
        scanf("%lld", a + i);
        m = max(m, a[i]);
    }
    for(i = 0; i < N; ++i){
        if(a[i] < m)++c;
        if(a[i] < m - 1)return puts("No") & 0;
    }
    if(c == 0 && *a == N - 1)return puts("Yes") & 0;
    puts(((c > m - 1) || (c < m * 2 - N)) ? "No" : "Yes");
    return 0;
}