import scala.collection.mutable import scala.collection.mutable.ArrayBuffer import scala.io.StdIn.* import scala.util.chaining.* import scala.math.* @main def main = val n = readLine.toInt val Array(a, b, c) = readLine.split(' ').map(_.toInt) if a < b then println(if a < c then "Yes" else "No") else println(if c < a then "Yes" else "No")