function Main(input){
    const lines = input.trim().split("\n");
    const s = lines[0];
    const t = lines[1];

    if (s === t.substring(0, t.length - 1)) {
        console.log("Yes");
    } else {
        console.log("No");
    }
}

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