import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val a = sc.nextInt
  val b = sc.nextInt
  val c = sc.nextInt

  val l = List(a,c,b)

  val res = if(l == l.sorted || l == l.sorted.reverse) "Yes" else "No"

  println(res)
}
