const Main = input => {
    const inp = input.split("\n");
    const s = inp[0];
    const t = inp[1];

    if(t.indexOf(s) === 0 && s.length + 1 === t.length) {
        console.log("Yes");
    } else {
        console.log("No");
    }
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));