object Main extends App {
  val input = io.StdIn.readLine().split(' ').toList.map(_.toInt)
  val result: Boolean = input.foldLeft((1, 1, true)) { case (acc, current) =>
    val prev2 = acc._1
    val prev1 = acc._2
    val reducedPrev = if (prev1 > current) prev1 - 1 else prev1
    val judge = prev2 <= reducedPrev && reducedPrev <= current
    (reducedPrev, current, acc._3 && judge)
  }._3
  if (result) println("Yes") else println("No")
}