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

int main()
{
    char S[11], T[12];
    scanf("%s%s", S, T);

    int i, length = strlen(S);

    int n = strncmp(S, T, length);

    if(n == 0 && strlen(T) == length+1)
        printf("Yes\n");

    else
        printf("No\n");

    return 0;
}
