"use strict";
function main(input) {
    var line = input.split("\n");
    let str = line[0];
    let str1 = line[1];
    str1 = str1.substring(0, str1.length-1);
    if(str === str1) console.log("Yes");
    else console.log("No");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));