include<stdio.h>
include<string.h>
int main(){
  char S[10];
  char T[10];
  int a;
  int x;x=0;
  scanf("%s%s",S,T);
  a=strlem(S);
  for(int i=0;i<ai++){
    if(S[i]!=T[i]){
    printf("No");
    x=1;
    }
    }
    if(x==0){
    printf("Yes");
    }
    return 0;
    }
    