
function Main (input) {
    input = input.split("\n");
    var S = input[0];
    var T = input[1];
    S == T.slice(0,-1) ? console.log("Yes"):console.log("No");
  }
  
  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
  