import scala.io.StdIn._

object Main extends App {
  val N = readInt()
  val stairs = readLine(" ").split(" ").map(_.toInt).toSeq

  val res = for (e <- 0 until N - 1) yield {
    if (stairs(e + 1) - stairs(e) >= -1 && stairs(e + 1) + 1 >= stairs(e)) true else false
  }

  if (res.contains(false)) println("No") else println("Yes")

}
