function main(input) {
  const s = input[0];
  const t = input[1];

  if(((s.length+1)===(t.length)) && (t.substr(0,s.length)===s)){
    console.log("Yes");
  }else{
    console.log("No");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));