from collections import Counter

N = int(input())
a = [int(i) for i in input().split()]

c = Counter(a)

if len(c) == 3 and 0 <= abs(c[0] - c[1]) <= 1 and 0 <= abs(c[0] - c[2]) <= 1 and 0 <= abs(c[1] - c[2]) <= 1 :
    print('Yes')
else :
    print('No')