import scala.io.StdIn

object Main {
  
  def main(args: Array[String]): Unit = {
    val n = StdIn.readLine().toInt
    val hs = StdIn.readLine().split(' ').toList.map(_.toInt)
    val ans = hs.foldLeft(Some(1000000001)){ (acc, h) =>
      acc.flatMap{ pre =>
        if (h - 1 >= pre) Some(h - 1)
        else if (h >= pre) Some(h)
        else None
      }
    }.isDefined
    println(if(ans) "Yes" else "No")
  }
  
}
