#include<stdio.h>

int main(){
  char c, s[11], flag = 0;
  
  scanf("%s", s);
  c = getchar();
  
  int i = 0;
  do{
    c = getchar();
    if(c != s[i] && s[i] != '\0'){
      flag = 1;
      break;
    }
    i++;
  }while(c != '\0' && s[i] != '\0');
  
  if(flag == 0){
    printf("yes");
  }
  else{
    printf("No");
  }
  
  return 0;
}