#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int		main()
{
	char *S, *N;

	S = (char *)malloc(sizeof(char) * 12);
	N = (char *)malloc(sizeof(char) * 12);
	scanf("%s\n%s\n", S, N);
	if (strlen(S) + 1 - strlen(N) == 0)
	{
		N[strlen(N) - 1] = '\0';
		if (strcmp(S, N) == 0)
		{
			printf("Yes\n");
			return (0);
		}
	}
	printf("No\n");
	return (0);
}