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

int main()
{
  char s[11];
  char t[12];

  scanf("%s %s", &s,&t);
  t[strlen(s)] = '\0'
  if(strcmp(s,t) == 0)
    printf("Yes");
  else
   ("No")
   
  return 0;
}
