function Main(input) {
  const nameArr = input.split("\n");
  
  const name1letArr = nameArr[0].split('');
  const name1letNum = name1letArr.length;
  
  const name2letArr = nameArr[1].split('');
  const name2letNum = name2letArr.length;
  
  let matchLetNum = 0;
  
  if (name2letNum === name1letNum + 1) {
    for (let i = 0; i < name1letNum; i++) {
      if (name2letArr[i] === name1letArr[i]) {
        matchLetNum += 1;
      }
    }
  }
  
  if (matchLetNum === name1letNum) {
    console.log("Yes");
  } else {
    console.log("No");
  }
}

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