import Prelude import Data.Bool (bool) main :: IO () main = do [x, y] <- map read . words <$> getLine _ <- getLine as <- map read . words <$> getLine putStrLn $ bool "NO" "YES" $ solve x y as solve :: Int -> Int -> [Int] -> Bool solve vx vy as = let dv = vy - vx in all (\(a, d) -> dv * a <= d * vx) $ distances as where distances :: [Int] -> [(Int, Int)] distances as = zip as $ zipWith (-) (tail as) as