program sample
	character(len=6) ;;x
    
    read(*,*) x
    
    if (x(3:3)==x(4:4) .and. x(5:5)==x(6:6)) then
    	write(*,*) 'Yes'
    else
    	write(*,*) 'No'
    end if
    stop
end program sample

