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

int main(){
  char s[12],t[12];
  scanf("%s",s);
  scanf("%s",t);
  int lens = strlen(s);
  int lent = strlen(t);

  int ans=1;
  for(int i=0;i<lens;i++){
    if(s[i]!=t[i]) ans=0;}
  if(lens+1!=lent) ans=0;

  if(ans){
    printf("Yes\n");}
  else{
    printf("No\n");}
  
  return 0;
}
