#include<stdio.h>
#include<string.h>
int main()
{
    char a[10], b[11];
    int count = 0, i;
    gets(a);
    gets(b);
    int x, y;
    x = strlen(a);
    y = strlen(b);
    if((x + 1) != y){
        printf("No\n");
    }

    if( ( x + 1) == y){
        for(i = 0; i < x; i++){
            if(a[i] == b[i]){
                count++;
            }
        }
    }

    if(x == count){
        printf("Yes\n");
    }
    else if( x != count){
        printf("No\n");
    }

    return 0;
}
