program main
  implicit none
  character(len=10) ::  S
  character(len=11) ::  T
  integer :: N,i 
  read(*,*) S
  read(*,*) T

  N = len(trim(S))
  do i = 1,N
     if (S(i:i) /= T(i:i)) then
        write(*,'(a)') 'No'
        stop
     end if
  end do
  write(*,'(a)') 'Yes'
end program main
