function main(arg) {
  const array = arg.trim().split("\n");
  const S = array[0];
  const T = array[1];
  var substLastStr = T.slice(0, -1);

  if (S.length != T.length - 1) {
    console.log("No");
    return;
  }

  if (S == substLastStr) {
    console.log("Yes");
    return;
  } else {
    console.log("No");
    return;
  }
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
// main("snuke\nsnekee");
//https://atcoder.jp/contests/abc167/tasks/abc167_a
