#include<stdio.h>
int main(void){
  char str[12],newstr[12] ;
  char ch;
  int i=0,judge=1,leng1=0,leng2=0;
  while ((ch = getchar()) != '\n') {
	  str[i] = ch;
	  i++;
	}
  i=0;
  while ((ch = getchar()) != '\n') {
	  newstr[i] = ch;
      i++;
	}
  for(i=0;str[i]!='\0';i++){
      leng1++;
  }
  for(i=0;newstr[i]!='\0';i++){
      leng2++;
  }
  if(leng2!=(leng1+1)){
      judge=0;
  }
  else{
      for(i=0;i<leng1;i++){
          if(str[i]!=newstr[i]){
              judge=0;
              break;
          }
      }
  }
  if(judge){
      printf("Yes");
  }
  else{
      printf("No");
  }
  
  
  
}