program main
    use,intrinsic :: iso_fortran_env
    implicit none
    character(11):: s,t

    read*, s
    read*, t

    if (t(1:len_trim(s)) == s(1:len_trim(s))) then
        print'(a)', 'Yes'
    else
        print'(a)', 'No'
    end if
    
end program main