'use strict'
function main(inp) {
  inp = inp.split('\n')
  const N = inp.shift() - 0
  inp = inp[0].split(' ').map(n => n - 0)
  let max = 0

  for (let i = 0; i < N; i++) {
    if (max < inp[i]) max = inp[i]
    if (max - 2 >= inp[i]) {
      console.log('No')
      return
    }
  }
  console.log('Yes')
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
