
function main(input) {
	let array = input.split("\n");
	if (array[0] === array[1].slice(0,-1)){
  		console.log("Yes");
	} else {
    	console.log("No")
    }

}


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