function A167(_input) {
    var lines = _input.split("\n");
    var first = lines.shift();
    var second = lines.shift();
    if (second.indexOf(first) === 0 && second.length === first.length + 1) {
        console.log('Yes');
        return;
    }
    console.log('No');
}
A167(require("fs").readFileSync("/dev/stdin", "utf8"));