#include<stdio.h>
int main(void){
    char s[11],t[12];
    scanf("%s %s",s,t);
    int i;
    int count=0;
    for(i=0;s[i]!='\0';++i){
        if(s[i]!=t[i]){
            count=1;
            break;
        }
    }
    if(count==0){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    return 0;
}