import Control.Monad
import Control.Applicative
import Data.List




getBysplit = map read . words <$> getLine

main :: IO()
main = do
  [a, b, c] <- getBysplit :: IO [Int]
  let [a1, b1] = sort [a, b]
  let ans = if a1 <= c && c <= b1
            then "Yes"
            else "No"
  putStrLn ans
