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

int main(){
	char s[256], t[256];
	int i, flag;
	fgets(s, 256, stdin);
	fgets(t, 256, stdin);
	for(i=0; s[i]!='\n' || s[i] != '\0'; ++i){
		if(s[i] == t[i]){
			flag = 1;
		}
		else flag = 0; break;
	}
	if(flag == 1) printf("yes");
	else printf("No");
	return 0;
}
