      PROGRAM piyo
      IMPLICIT NONE
      character(11) :: s,t
      integer :: len
      
      read*,s
      read*,t
      
      len = len_trim( s )
      
      if( s(1:len)==t(1:len) )then
        print*,'Yes'
      else
        print*,'No'
      end if
      
      
      
      
      
      
      END PROGRAM