#include<iostream>
#include<algorithm>
using namespace std;
int m=1e9,M,n,a[1<<17];
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		m=min(m,a[i]);
		M=max(M,a[i]);
	}
	if(M==m)
	{
		cout<<(m==n-1||m<=n/2?"Yes":"No")<<endl;
	}
	else if(M==m+1)
	{
		int cntm=0,cntM=0;
		for(int i=0;i<n;i++)cntm+=a[i]==m,cntM+=a[i]==M;
		cout<<(M<=(n-cntm)/2+cntm&&m>=cntm?"Yes":"No")<<endl;
	}
	else cout<<"No"<<endl;
}
