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

int main(void) {
	char s[10 + 1];
	char T[10 + 1 + 1];
	int count;

	scanf("%s",s);
	scanf("%s",T);

	count = strlen(s);
	if (count + 1 == strlen(T)) {
		if (strncmp(s,T,count)==0) {
			printf("Yes\n");
			return 0;
		}
	}
	printf("No\n");
	return 0;
}
