solve [_] = "Yes"
solve (a:b:c) | a < b = solve ((b-1):c)
              | a == b = solve (b:c)
              | otherwise = "No"

main = do
    n <- readLn :: IO Int
    hn <- map read . words <$> getLine :: IO [Int]
    putStrLn $ solve hn
