object Main extends App {
  io.StdIn.readLine() // 1行目捨てる
  val input = io.StdIn.readLine().split(' ').toList.map(_.toInt)
  val result: Boolean = input.foldLeft((1, true)) { case (acc, num) =>
    val prev = acc._1
    (num, num < prev + 1)
  }._2
  if (result) println("Yes") else println("No")
}