import Data.Bool
import Data.List

main = do
 n <- readLn
 as <- map read . words <$> getLine
 putStrLn $ bool "No" "Yes" (hats n as)

hats n as
 | all (==1) as = True
 | all (==(n-1)) as = True
 | length gs == 1 && n `mod` head (head gs) /= head (head gs) - 1 = True 
 | length gs == 2 && head (head gs) == 1 && head (head gs) + length (head gs) == head (head (tail gs)) = True
 | otherwise = False
 where gs = sort $ group (sort as)