function Main(input){
  input = input.trim().split('\n');
  var ans = '';
  if (input[0] === input[1].slice(0,-1)){
    ans = 'Yes'
  }else{
    ans = 'No';
  }
  console.log(ans);
}


Main(require("fs").readFileSync("/dev/stdin", "utf8"));