import Data.Fixed

main = 
    interact (calc . words)

calc :: [String] -> String
calc (a:b:_) = 
    d ++ " " ++ r ++ " " ++ f ++ "\n"
    where
        x = (read::String->Int) a
        y = (read::String->Int) b
        d = show $ x `div` y
        r = show $ x `mod` y
        s = (read::String->Pico) a
        t = (read::String->Pico) b
        f = show $ s / t
