object Main {

  def main(args: Array[String]): Unit = {
    val n = io.StdIn.readLine().toInt
    val hList = io.StdIn.readLine().split(" ").map(_.toInt).toList
    val answer = solve(n, hList)
    println(answer)
  }

  private def solve(n: Int, hList: List[Int]): String = {

    val test = hList.foldLeft(Some(0): Option[Int]) { (acc, h) =>
      acc.flatMap { v =>
        if (h - v >= 1) Some(h - 1)
        else if (h >= v) Some(h)
        else None
      }
    }

    if (test.isDefined) "Yes"
    else "No"
    
  }
}
