/*	Success may not come to me immediately,
 *	but it will come definitely....
 */
#include<bits/stdc++.h>
//=====================================================================
using namespace std;
//=====================================================================
#define opt	ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
//=====================================================================
#define li	int64_t
#define ld	double_t
#define ulli	uint64_t
//=====================================================================
#define rep(i,a,b)	for(i=a;i<b;i++)
#define repr(i,a,b)	for(i=a;i>b;i--)
#define repi(i,v)	for(i=v.begin();i!=v.end();i++)
#define elif		else if
#define mset(a,b)	memset(a,b,sizeof(a))
#define nl		cout<<'\n'
//=====================================================================
typedef vector<li>       vli;
typedef vector<string>	 vstr;
typedef pair<li,li>      pli;
typedef pair<li,pli >    ppli;
typedef pair<li,ppli >   pppli;
typedef vector<pli >     vpl;
typedef vector<ppli >    vppli;
typedef vector<pppli >   vpppli;
//=====================================================================
#define pb	push_back
#define pob	pop_back
#define pf	push_front
#define pof	pop_front
#define all(v)	v.begin(),v.end()
#define itr	iterator
#define sz	size()
#define lb	lower_bound
#define ub	upper_bound
#define bs	binary_search
#define mp	make_pair
#define F	first
#define S	second
//=====================================================================
#define mod	1000000007
#define inf	1000000000000000005
#define MX1	100005
#define MX2	1000005
#define pi	acos(-1)
//=====================================================================
li power(li a,li b){li ans=1;while(b){if(b&1){ans=(ans*a)%mod;}
a=(a*a)%mod;b>>=1;}return ans;}
//=====================================================================
li mmi(li n){return power(n,mod-2);}
//=====================================================================
li two(li n){return 1<<n;}
//=====================================================================
void onbit(li &n,li x){n|=two(x);}
//=====================================================================
void offbit(li &n,li x){n&=~two(x);}
//=====================================================================
li cntbit(li n){li res=0;while(n and ++res)n-=n&-n;return res;}
//=====================================================================
li dx[]={-1,0,1,0},dy[]={0,-1,0,1};
//=====================================================================
/*------------------------MAIN CODE BEGINS NOW!------------------------*/

li n,a[MX1];

void solve(){
	li i;cin>>n;
	rep(i,0,n) cin>>a[i];
	li maxx=0,minx=mod,flag=0;
	rep(i,0,n){
		maxx=max(maxx,a[i]);
		minx=min(minx,a[i]);
	}
	if(maxx==minx){
		//When all the cats are alone
		//this means that they each
		//have a distinct color hat
		//so each a[i] should be n-1.
		if(maxx==n-1){
			flag=1;
		}
		//When all the cats are not
		//alone this means that each
		//cat has a color that is 
		//also shared by atleast one
		//other cat.
		//Suppose each cat sees a[i]
		//distinct colors then n/a[i]
		//gives the number of cats
		//present for each color.
		//This should be greater than
		//or equal to 2 as every color 
		//should be shared by atleast
		//2 cats.
		else{
			rep(i,0,n){
				if(n/a[i]<2){
					flag=0;
					break;
				}
				flag=1;
			}
		}
	}elif(maxx-minx==1){
		li x=0,y=0;
		rep(i,0,n){
			if(a[i]==minx) x++;
			else y++;
		}
		if(x+1<=maxx and maxx<=x+y/2) flag=1;
	}
	if(flag) cout<<"Yes";
	else cout<<"No";
}

int main(){
    opt
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    li t=1;
    //cin>>t;
    while(t--){
        solve();
    }
    return 0;
}

Measured memory_bytes: 1024