'use strict';

function main(stdin) {
  const input = stdin.split('\n');
  const N = Number(input.shift());
  const heights = input[0].split(' ').map(v => parseInt(v, 10));
  let ans = true;

  for (let i = 0; i < N - 1; ++i) {
    const n1 = heights[i];
    const n2 = heights[i + 1];

    if (n1 < n2) heights[i + 1] -= 1;

    if (n2 - n1 < 0) {
      ans = false;
      break;
    }
  }

  answer(ans);
}

function answer(bool) {
  if (bool) console.log('Yes');
  else console.log('No');
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));