program main
	implicit none
    character(11)::s,t
    integer::i,lenn
    read(*,*)s
    read(*,*)t
    lenn=len_trim(s)
    do i=1,lenn
    	if(s(i:i)==t(i:i))then
        	cycle
        else
        	write(*,*)'No'
            stop
        end if
    end do
    write(*,*)'Yes'
    stop
end program main
    
