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

solve xs curr
    | VU.null xs = "Yes"
    | diff > 0 = solve (VU.tail xs) next
    | diff == (-1) = solve (VU.tail xs) (next-1)
    | otherwise = "No"
    where
        diff = next - curr
        next = VU.head xs

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