

void main(){
	
	auto S = readln().chomp();
	auto T = readln().chomp();
	
	if ( S[] == T[0..$-1] ){
		writeln("Yes");
	} else {
		writeln("No");
	}
	
}



import std;


string readStr(){
	return readln().chomp();
}
T[] readLine( T = long )(){
	return readln().split().to!(T[])();
}