judge :: [Integer] -> String judge (h : w : n : k : _) = if (==) k $ (+) 1 $ flip mod n $ h * w - 1 then "YES" else "NO" main :: IO () main = putStrLn . judge . map read . words =<< getLine