function main(lines) {
    const input = lines.split('\n')
    const S = input[0]
    const T = input[1].split('')
    const beforeT = T.slice(0,T.length-1).join('')

    if(S.length + 1 === T.length && S === beforeT){
        console.log('Yes')
    } else {
        console.log('No')
    }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));

