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

#define YES "Yes"
#define NO "No"

int main()
{
    int id_s_num = 0;
    int id_t_num = 0;
    char id_s[15];
    char id_t[256];

    scanf("%s", id_s);
    scanf("%s", id_t);

    id_s_num = strlen(id_s);
    id_t_num = strlen(id_t);

    if (((id_t_num - id_s_num) == 1)&&(strncmp(id_s, id_t, id_s_num) == 0))
        printf("Yes");
    else
        printf("No");

    return 0;
}