module Main where import qualified Data.ByteString.Char8 as BS import Data.Char import Data.String import Data.List import Data.Maybe import Control.Monad main :: IO () main = do [a1, a2, a3, a4] <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine putStrLn $ if sanzen a1 a2 a3 a4 then "YES" else "NO" sanzen :: Int -> Int -> Int -> Int -> Bool sanzen a1 a2 a3 a4 = a1 < a2 && a3 > a4