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

int main() {
  	char s1[100], s2[100];
  
  	scanf("%s", s1);
  	scanf("%s", s2);
  
  	int flg = -1;
  	if (strlen(s1) +1 == strlen(s2)) {
      for (int i = 0; i < strlen(s1) -1; i++) {
          if (s1[i] != s2[i])
              flg = 0;
        break;
      }
    } else {
      flg = 0;
    }
  	if (flg) {
      	printf("Yes");
    } else {
       	printf("No");
    }
  	return 0;
}