function main(input) {
  const lines = input.trim().split("\n");
  const S = lines[0];
  const T = lines[1];

  const res = T.includes(S) && T.length - S.length === 1 && T.slice(-1).match(/[a-zA-Z]/) ? 'Yes' : 'No';
  
  console.log(res);
}

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