program example

	implicit none

	character(6) S
    
    read(*,*) S
    
    if(S(3:3)==S(4:4) .and. S(5:5)==S(6:6)) then
    	write(*,*) "Yes"
    else
    	write(*,*) "No"
        
    end if

end program example