object Main extends App {
  @scala.annotation.tailrec
  def loop(ints: Seq[Int]): String = ints match {
    case _ :: Seq() => "Yes"
    case x :: xs => if (xs.forall(x - 1 <= _)) loop(xs) else "No"
  }
  val sc = new java.util.Scanner(System.in)
  println(loop(Seq.fill(sc.nextInt())(sc.nextInt())))
}