#include<stdio.h>

int main() {

  char S[100], T[100];
  int i = 0;
  int result = 0;
  scanf("%s", S);
  scanf("%s", T);

  while(S[i] != '\0'){
    if(S[i] != T[i]){
      printf("No");
      result = 1;
      break;
    }
    i++;
  }

  if(result == 0){
    printf("Yes");
  }

  return 0;
}