"use strict";

const main = arg => {
    const input = arg.trim().split('\n');
    console.log( input[0] == input[1].slice(0, -1) ? 'Yes' : 'No')
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));  