#include<stdio.h>
#include<string.h>
int main(){
	char s[15]={'\0'},t[15]={'\0'};
	scanf("%s",s);
	getchar();
	scanf("%s",t);
	int length=strlen(s);
	t[length]={'\0'};
	if(strcmp(s,t)==0) printf("Yes");
	else printf("No");
	return 0;
}