main = do
    getLine
    ls <- map read . words <$> getLine
    putStrLn $ if getsolve ls then "Yes" else "No"
    
getsolve :: [Int] -> Bool
getsolve ls
    | length ls == 1            = True
    | last ls >= semilast       = getsolve $ init ls
    | last ls + 1 >= semilast   = getsolve $ (init $ init ls) ++ [semilast - 1]
    | otherwise                 = False
    where semilast = last $ init ls