-- Try yukicoder -- author: Leonardone @ NEETSDKASU main = getContents >>= putStrLn . solve . map read . words solve (x:y:n:xs) = calc xs where calc (i:j:ys) | i * y <= j * x = calc (j:ys) | otherwise = "NO" calc _ = "YES"