import Control.Applicative
import Numeric

calc (a:b:c:d:e:f:g) = do
    putStr $ showFFloat (Just 3) ((e*c-b*f)/(a*e-b*d)) ""
    putStr " "
    putStrLn $ showFFloat (Just 3) ((a*f-c*d)/(a*e-b*d)) ""


main = do
    ss <- lines <$> getContents
    let ll = map (\x->map (\y->read y::Double) $ words x)  ss
    mapM_ calc ll