program main
    implicit none
    character s*10,t*10
    integer is, it, i, flag
    read(*,*) s
    read(*,*) t
    is = len_trim(s)
    it = len_trim(t)
    flag = 0
    
    if (it == is + 1) then
        do i = 1, is
            if (s(i:i) == t(i:i)) then
                flag = 0
            else
                flag = 1
                exit
            end if
        end do
        if(flag == 0) then
            write(*,*) "Yes"
        else if(flag == 1) then
            write(*,*) "No"
        end if
    else
        write(*,*) "No"
    end if


end program