#include <stdio.h>

int main()
{
  char S[11];
  char T[12];
  scanf("%s\n%s",&S,&T);
  int i;
  int len;
  i = 0;
  while (S[i])
  {
    if (S[i] != T[i])
    {
      printf("No\n");
      return (0);
    }
    i++;
  }
  len = i;
  i = 0;
  while (T[i])
  {
    i++;
  }
  if (i == len + 1)
  {
    printf("Yes\n");
  }
  else
  {
    printf("No\n");
  }
}