"use strict";

function main(input) {
  input = input.split("\n");
  if (input[0].length + 1 == input[1].length) {
    const str1 = input[0].split("");
    const str2 = input[1].split("");
    for (let i = 0; i < str1.length; i++) {
      if (str1[i] !== str2[i]) {
        console.log("No");
        return;
      }
    }
  }
  console.log("Yes");
}

main(require("fs").readFileSync("/dev/stdin", "utf-8"));
