object Main extends App {
  @scala.annotation.tailrec
  def loop(i: Int, ints: Seq[Int]): String = ints match {
    case Seq() => "Yes"
    case x :: xs if x <= i + 1 => loop(x min i, xs)
    case _ => "No"
  }

  val sc = new java.util.Scanner(System.in)
  val i :: ints = Seq.fill(sc.nextInt())(sc.nextInt()).reverse
  println(loop(i, ints))
}