import sys

stdin = sys.stdin



def li(): return map(int, stdin.readline().split())

def li_(): return map(lambda x: int(x)-1, stdin.readline().split())

def lf(): return map(float, stdin.readline().split())

def ls(): return stdin.readline().split()

def ns(): return stdin.readline().rstrip()

def lc(): return list(ns())

def ni(): return int(stdin.readline())

def nf(): return float(stdin.readline())



n = ni()

a = list(li())



exist = True



if max(a) - min(a) > 1:

    exist = False

    

elif max(a) >= n:

    exist = False

    

elif max(a) - min(a) == 1:

    if a.count(min(a)) < max(a) and 2*(max(a)-a.count(min(a))) <= a.count(max(a)):

        exist = True

    else:

        exist = False

        

elif max(a) == min(a):

    if 2*a[0] <= n or a[0]+1 == n:

        exist = True

    else:

        exist = False

        

print("Yes") if exist else print("No")

n = int(eval(input()))

a = list(map(int, input().split()))



unum = min(a)

vnum = max(a)



u = a.count(unum)

v = a.count(vnum)



exist = False



if vnum-unum == 1:

  if u+1 <= vnum <= u+v//2:

    exist = True

    

elif vnum == unum:

  if vnum == n-1 or vnum <= n//2:

    exist = True

    

print(("Yes" if exist else "No"))

import sys

stdin = sys.stdin


def li():
    return map(int, stdin.readline().split())


def li_():
    return map(lambda x: int(x) - 1, stdin.readline().split())


def lf():
    return map(float, stdin.readline().split())


def ls():
    return stdin.readline().split()


def ns():
    return stdin.readline().rstrip()


def lc():
    return list(ns())


def ni():
    return int(stdin.readline())


def nf():
    return float(stdin.readline())


n = ni()
a = list(li())
exist = True
if max(a) - min(a) > 1:
    exist = False
elif max(a) >= n:
    exist = False
elif max(a) - min(a) == 1:
    if a.count(min(a)) < max(a) and 2 * (max(a) - a.count(min(a))) <= a.count(max(a)):
        exist = True
    else:
        exist = False
elif max(a) == min(a):
    if 2 * a[0] <= n or a[0] + 1 == n:
        exist = True
    else:
        exist = False
print("Yes") if exist else print("No")

n = int(eval(input()))
a = list(map(int, input().split()))
unum = min(a)
vnum = max(a)
u = a.count(unum)
v = a.count(vnum)
exist = False
if vnum - unum == 1:
    if u + 1 <= vnum <= u + v // 2:
        exist = True
elif vnum == unum:
    if vnum == n - 1 or vnum <= n // 2:
        exist = True
print(("Yes" if exist else "No"))

-import sys - -stdin = sys.stdin - - -def li(): -    return map(int, stdin.readline().split()) - - -def li_(): -    return map(lambda x: int(x) - 1, stdin.readline().split()) - - -def lf(): -    return map(float, stdin.readline().split()) - - -def ls(): -    return stdin.readline().split() - - -def ns(): -    return stdin.readline().rstrip() - - -def lc(): -    return list(ns()) - - -def ni(): -    return int(stdin.readline()) - - -def nf(): -    return float(stdin.readline()) - - -n = ni() -a = list(li()) -exist = True -if max(a) - min(a) > 1: -    exist = False -elif max(a) >= n: -    exist = False -elif max(a) - min(a) == 1: -    if a.count(min(a)) < max(a) and 2 * (max(a) - a.count(min(a))) <= a.count(max(a)): +n = int(eval(input())) +a = list(map(int, input().split())) +unum = min(a) +vnum = max(a) +u = a.count(unum) +v = a.count(vnum) +exist = False +if vnum - unum == 1: +    if u + 1 <= vnum <= u + v // 2: -    else: -        exist = False -elif max(a) == min(a): -    if 2 * a[0] <= n or a[0] + 1 == n: +elif vnum == unum: +    if vnum == n - 1 or vnum <= n // 2: -    else: -        exist = False -print("Yes") if exist else print("No") +print(("Yes" if exist else "No"))