{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Main where

import Control.Applicative
import Control.Monad
import Text.Printf         (printf)

main :: IO ()
main = do
    xs <- map (map read . words) . lines <$> getContents :: IO [[Double]]
    forM_ xs $ \[a,b,c,d,e,f] -> do
        let x = (b * f - c * e) / (b * d - a * e)
            y = (a * f - c * d) / (a * e - b * d)
        printf "%.3f %.3f\n" (round' 3 x) (round' 3 y)
  where
    round' :: RealFrac a => Int -> a -> a
    round' n x = fromIntegral (floor (0.5 + x * 10^n)) / 10^n