"use strict";
var input = require("fs").readFileSync("/dev/stdin", "utf8");
var cin = input.trim().split(/ |\n/), cid = 0;

function main() {
    let S = cin.shift();
    let T = cin.shift();
    if (S.length + 1 == T.length && S ==T.substr(0, S.length)) {
        console.log("Yes");
    } else {
        console.log("No");
    }
}
main();
