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 = {

    def loop(_list: List[Int], cur: Option[Int]): String = {
      if (_list.isEmpty) "Yes"
      else if (cur.isEmpty) loop(_list.tail, Some(_list.head))
      else if (_list.head - cur.get > -2) loop(_list.tail, Some(_list.head))
      else  "No"
    }

    loop(hList, None)
  }

}
