"use strict";

const main = arg => {
    const input = arg.trim().split("\n");

    const s = input[0];
    const t = input[1];
    const ta = t.slice(0, t.length-1)
    if(ta == s){
        console.log("Yes")
    } else {
        console.log("No")
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));  