function Main(input){ 
  var N = input.split("\n")[0].trim();
  var H = input.split("\n")[1].split(" ");
  N = parseInt(N,10);
  if(H.length=1){
    console.log("Yes");
  }else{
  for(i=0;i<=(N-1);i++){
    H[i] = parseInt(H[i],10);
  }
  var a;
  for(j=0;j<=(N-2);j++){
    a = H[j] <= H[j+1];
    if(a==false){
      H[j] = H[j] - 1;
      a =H[j] <= H[j+1];
      if(a==false){
        console.log("No");
        break;
      }
    }
  }
  //確かめ
  var b;
  if(a==true){
    for(k=0;k<=(N-2);k++){
      b = H[k] <= H[k+1];
      if(b==false){
        console.log("No");
        break;
      }
    }
  }
  //確かめもOKならYES
  if(b==true){
    console.log("Yes");
  }
}
}
  Main(require('fs').readFileSync('/dev/stdin','utf8'));