// dfmt off
T lread(T=long)(){return readln.chomp.to!T;}T[] lreads(T=long)(long n){return iota(n).map!((_)=>lread!T).array;}
T[] aryread(T=long)(){return readln.split.to!(T[]);}void arywrite(T)(T a){a.map!text.join(' ').writeln;}
void scan(L...)(ref L A){auto l=readln.split;foreach(i,T;L){A[i]=l[i].to!T;}}alias sread=()=>readln.chomp();
void dprint(L...)(lazy L A){debug{auto l=new string[](L.length);static foreach(i,a;A)l[i]=a.text;arywrite(l);}}
static immutable MOD=10^^9+7;alias PQueue(T,alias l="b<a")=BinaryHeap!(Array!T,l);import std, core.bitop;
// dfmt on

void main()
{
    long N = lread();
    auto A = aryread();
    long[long] cnt;
    foreach (a; A)
    {
        cnt[a] = cnt.get(a, 0) + 1;
    }
    if (!A.all!(a => a < N))
    {
        writeln("No");
        return;
    }
    switch (cnt.keys.length)
    {
    case 1:
        writeln((A[0] * 2 <= N || N - 1 == A[0]) ? "Yes" : "No");
        return;
    case 2:
        long a = cnt.keys[0];
        long b = cnt.keys[1];
        if (b < a)
            swap(a, b);
        if (b - a != 1)
        {
            writeln("No");
            return;
        }
        dprint(N - cnt[a], b - cnt[a]);
        writeln(cnt[a] < b && 2 * (b - cnt[a]) <= cnt[b] ? "Yes" : "No");
        return;
    default:
        writeln("No");
        return;
    }
}
