"use strict"

function Main(input) {
	let input = input.split("\n");
	if(input[0] === input[1].substring(0, input[1].length - 1)){
    	console.log('Yes');
    } else {
      	console.log('No');
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
