import Control.Applicative
import Numeric


keta :: Double -> String
keta d = do
    let dd = read (showFFloat (Just 3) d "") :: Double
    if dd == 0.0 then "0.000" else  (showFFloat (Just 3) d "")

calc (a:b:c:d:e:f:g) = do
    putStr $ keta  ((e*c-b*f)/(a*e-b*d))
    putStr " "
    putStrLn $ keta  ((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