import scala.io.{StdIn => in}

object Main extends App {
  val Array(a, b, c) = in.readLine.split(" ").map(_.toInt)
  val sort = List(a, b, c).sorted
  val ans = if(sort(1) == c) "Yes" else "No"
  println(ans)
}