#include <stdio.h>

char S[20],T[20];

int main()
{
	//変数宣言
	int can=0;
	int i=0;
	
	//初期入力
	scanf("%s",S);
	scanf("%s",T);
	
	while(can==0)
	{
		if(S[i] == '\0')
		{
			if(T[i]!='\0' && T[i+1]=='\0')
			{
				can = 1;
			}
			else
			{
				can = -1;
			}
		}
		else if(S[i] != T[i])
		{
			can = -1;
		}
		else
		{
			i++;
		}
	}
	
	
	//最終出力
	if(can == 1)
	{
		printf("Yes\n");
	}else
	{
		printf("No\n");
	}
	
	return 0;
}