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

int main(void)
{
    char    str[512];
    char    str2[512];
    int i;
    int len;
    int len2;
    int on = 0;

    scanf("%s", str);
    scanf("%s", str2);

    len = strlen(str);
    len2 = strlen(str2);
    on = strncmp(str, str2, len);
    if (on == 0 && len + 1 == len2) {
        printf("Yes\n");
    }
    else {
        printf("No\n");
    }
    
    return  0;
}