#include<bits/stdc++.h>
using namespace std;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>

using namespace __gnu_pbds;
using namespace __gnu_cxx;

#define  FIO        ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define  IN         freopen("input.txt","r",stdin);
#define  OUT        freopen("output.txt","w",stdout);
#define  debug(x)   cout<< #x << " --> " << x << "\n";
#define  NL         printf("\n");
#define  case(x)    printf("Case %lld: ",x);
#define  readI(x)   scanf("%d",&x);
#define  readL(x)   scanf("%lld",&x);
#define  writeI(x)  printf("%d",x);
#define  writeL(X)  printf("%lld",x);
#define  all(v)     v.begin(),v.end()

#define  ll     long long
#define  ld     long double
#define  pb     push_back
#define  pii    pair< int,int >
#define  pll    pair< ll,ll >
#define  vii    vector< int >
#define  vll    vector< ll >
#define  vss    vector< string >
#define  vdd    vector< double >
#define  vpi    vector< pii >
#define  vpl    vector< pll >
#define  vvi    vector< vii >
#define  vvl    vector< vll >
#define  PQ     priority_queue
#define  ff     first
#define  ss     second
#define  MX     105
#define  mod    1000000007
#define  INF    10000000000000000
#define  EPS    1e-12

/* Special functions:
		find_by_order(k) --> returns iterator to the kth largest element counting from 0
		order_of_key(val) --> returns the number of items in a set that are strictly smaller than our item
*/

typedef tree<
ll,					// type long long
null_type,
less<ll>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

struct compare
{
    bool operator() (ll a, ll b)
    {
        return a>b;
    }
};

const ll p1=131,p2=137;
const ll mod1=1000000009;
const ll mod2=1000000007;

bool marked[MX];
vll primes;

ll bigMod(ll x, ll n)
{
    if(!n)
        return 1LL;
    ll temp=bigMod(x,n/2);
    temp=(temp*temp)%mod;
    if(n%2)
        temp=(temp*x)%mod;
    return temp;
}

void sieve()
{
    marked[0]=marked[1]=true;
    for(ll i=2;i*i<MX;i++){
        if(marked[i]==false){
            for(ll j=i*i;j<MX;j+=i){
                marked[j]=true;
            }
        }
    }

    for(ll i=2;i<MX;i++)
        if(!marked[i]){
            primes.push_back(i);
        }
}

vpl primeFactors(ll N)
{
	vpl factors;
	ll pf_id=0,pf=primes[pf_id];
	while(pf*pf<=N){
        ll cnt=0;
		while(N%pf==0) N/=pf,cnt++;
        if(cnt) factors.push_back({pf,cnt});

		pf=primes[++pf_id];
	}

	if(N!=1) factors.push_back({N,1});
    return factors;
}


struct pair_hash {
    template <class T1, class T2>
    size_t operator () (const pair<T1,T2> &p) const {
        auto h1 = hash<T1>{}(p.first);
        auto h2 = hash<T2>{}(p.second);

        // Mainly for demonstration purposes, i.e. works but is overly simple
        // In the real world, use sth. like boost.hash_combine
        return h1 ^ h2;
    }
};

struct chash {
	static uint64_t splitmix64(uint64_t x) {
		// http://xorshift.di.unimi.it/splitmix64.c
		x += 0x9e3779b97f4a7c15;
		x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
		x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
		return x ^ (x >> 31);
	}
	// Note: when casting y to unsigned x, x will be least unsigned int congruent
	// to y mod 2^64.
	size_t operator()(uint64_t x) const {
		static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
		return splitmix64(x + FIXED_RANDOM);
	}
};
gp_hash_table<ll, ll, chash>var;


                        /**---------End of Template---------**/


bool check(ll mn, ll c, ll x, ll y, ll mx)
{
    if(c-x>y) return false;
    if(mn!=mx and mn+1!=c) return false;

    if((c-x)>0 and y%(c-x)==0) return true;
    return false;
}

int main()
{

    FIO;
//    IN;
//    OUT;

    ll n;
    cin>> n;
    vll v(n);
    for(ll i=0;i<n;i++) cin>> v[i];
    sort(all(v));

    ll mx=v.back();
    ll y=0;
    ll x=0;
    for(ll i=0;i<n;i++) if(v[i]!=mx) x++;
    for(ll i=0;i<n;i++) if(v[i]==mx) y++;

    if(check(v[0],mx,x,y,mx) or check(v[0],mx+1,x,y,mx)) cout<< "Yes";
    else cout<< "No";

}



Measured memory_bytes: 1024