import qualified Data.ByteString.Char8 as B import qualified Data.Maybe as M readInts :: IO [Int] readInts = map (fst . M.fromJust . B.readInt) . B.words <$> B.getLine main :: IO () main = do [a1, a2, a3, a4] <- readInts if a1 < a2 && a3 > a4 then putStrLn "YES" else putStrLn "NO"