function Main(input)
{
	input = input.split("\n");

	var i = input[1].substring(0, input[1].length - 1);
	if (input[0] == i)
	{
		console.log("Yes");
	}else{
		console.log("No");
	}

}

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