import io.StdIn.readLine

object Main extends App {
  val in = readLine.split(" ").map(_.toInt).toList

  def loop(list: List[Int]): String = list match {
    case _ :: Nil => "Yes"
    case head :: tail if head < tail.head => loop(tail)
    case _ => "No"
  }

  val result = loop(in)
  println(result)
}

