var input = parseInt(require("fs").readFileSync("/dev/stdin", "utf8"), 10);
var nums = input.split("\n")[1].split(" ").map(function(num) { return parseInt(num, 10); });

let can = true;

let prev = Math.MAX_VALUE;
for (var i = 0; i < nums.length; i++) {
  if (prev + 1 < nums[i]) {
    can = false;
    break;
  }
  prev = nums[i];
}

console.log(can ? 'Yes' : 'No');
