program main
      implicit none
      integer :: l 
      character(10) :: s, t

     read *, s
     read *, t
     
     l = len_trim(t)
     if( s ==  t(1:l-1) ) then
       print *, 'Yes'
     else
       print *, 'No'
     end if

      
end program main
