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

#define S_MAX_LEN 10

int main(void)
{
  char s[0x100];
  char t[0x100];
  char t_cpy[0x100];
  int s_len;
  int t_len;
  
  scanf("%s", s);
  scanf("%s", t);
  
  s_len = strlen(s);
  t_len = strlen(t);
  
  if (1 <= s_len && s_len <= 10 && t_len == s_len + 1) {
    strcpy(t_cpy, t);
    t_cpy[s_len] = '\0';
    
    if (strcmp(s, t_cpy) == 0) {
      printf("Yes");
    }
    else {
      printf("No");
    }
  }
  else {
    printf("No");
  }
  
  return 0;
}
