module Main where import Control.Monad main :: IO () main = do [x, y] <- fmap read . words <$> getLine :: IO [Double] _ <- getLine as <- fmap read . words <$> getLine :: IO [Double] let f (a, b) = if a * y / x > b then True else False if any f (zip as (tail as)) then putStrLn "NO" else putStrLn "YES"