import qualified Data.Vector.Unboxed as VU
import qualified Data.ByteString.Char8 as B
import Data.Char

solve xs
    | l == 1 = "Yes"
    | l == 2 = if (VU.last xs) - (VU.head xs) >= (-1) then "Yes" else "No"
    | otherwise = loop xs
        where
            l = VU.length xs
            loop ys
                | VU.length ys <= 2 = "Yes"
                | (x >= y) && (y > z) = "No"
                | otherwise = loop (VU.tail ys)
                    where
                        x = ys VU.! 0
                        y = ys VU.! 1
                        z = ys VU.! 2

main = do
    n <- readLn :: IO Int
    xs <- VU.unfoldrN n (B.readInt . B.dropWhile isSpace) <$> B.getLine
    putStrLn $ solve xs
    