#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define ll long long
#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))
#define miin(a, b, c) min((a), min((b), (c)))
#define maax(a, b, c) max((a), max((b), (c)))
#define mod 1000000007

int main()
{
    char s[100], t[100];
    int i, f = 0, slen, tlen;
    scanf("%s %s", s, t);
    slen = strlen(s);
    tlen = strlen(t);
    for (i = 0; i < slen; i++) {
        if (s[i] != t[i]) {
            printf("No");
            f = 1;
            break;
        }
    }
    if (f == 0 && slen + 1 == tlen) printf("Yes");
    return 0;
}