#include<stdio.h>
#include<string.h>
int main()
{
    int a,b,n=0,h,w,j,i,c=0;
    char x[100],y[100];
    scanf("%s%s",x,y);
    y[strlen(x)]='\0';
    if(strcmp(x,y)==0){printf("Yes\n");}
    else{printf("No\n");}



    return 0;
}
