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

int main(void){

  char s[11], t[12];
  scanf("%s", s);
  scanf("%s", t);
  int length_s = strlen(s);
  int length_t = strlen(t);
  if (length_t != length_s+1) {
    printf("No\n");
    return 0;
  }
  int flag = 1;
  for (int i = 0; i < length_s; i++) {
    if (s[i] != t[i]) {
      flag = 0;
      break;
    }
  }
  if (flag == 1) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }

  return 0;
}