#include<stdio.h>
#include <string.h>

int main (){
  char S[10],T[11];
  int count = 0;
  scanf("%s",S);
  scanf("%s",T);
  
  int S_length = sizeof S/sizeof S[0]
  for(int i = 0 ;i < S_length;i++){
     if(S[i] == T[i]){
        count++;
     }
  }

  if(count == S_length){
     printf("Yes");
  }else{
     printf("Nn");
  }
  
  return 0;
}
