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

int main(void) {
	char S[16] = "";
	char T[16] = "";
	if (scanf("%15s", S) != 1) return 1;
	if (scanf("%15s", T) != 1) return 1;
	S[strlen(S)] = T[strlen(T) - 1];
	puts(strcmp(S, T) == 0 ? "Yes" : "No");
	return 0;
}
