object Main extends App {
  val input = io.StdIn.readLine().split(' ').toVector.map(_.toInt)
  val getResult: Seq[Int] => Boolean = list => list.foldLeft((1, true)) { case (acc, current) =>
    val prevMax = acc._1
    val judge = current >= prevMax - 1
    (math.max(prevMax, current),  acc._2 && judge)
  }._2

  if (getResult(input)) println("Yes") else println("No")
}