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

int main(){
  char id1[10],id2[11];
  int length1,length2;
  
  scanf("%s",id1);
  length1 = (int)strlen(id1);
  
  scanf("%s",id2);
  length2 = (int)strlen(id2);
  
  if (length1 + 1 == length2){
    if (strncmp(id1,id2,length1) == 0)
      printf("Yes\n");
    else 
      printf("No\n");
  }
  else 
    printf("No\n");

  return 0;
}