import Control.Monad
import Control.Applicative
import System.IO
import Data.List

main = do
  inputs <- getContents
  mapM (putStrLn . solve) $ lines inputs

solve :: String -> String
solve input = let
  [a, b, c, d, e, f] = read <$> words input :: [Double]
  ic = [c, f]
  det = a * e - b * d
  inv = (/det) <$> [e, -b, -d, a]
  [x, y] = matvec inv ic
  in showRound x ++ " " ++ showRound y

matvec :: [Double] -> [Double] -> [Double]
matvec m v = let
  mv = zipWith (*) m $ v ++ v
  (f, l) = splitAt 2 mv
  in [sum f, sum l]

showRound :: Double -> String
showRound x = let
  base = ceiling $ x * 1000 :: Int
  round = if x >= (fromIntegral base + 0.5) / 1000 then base + 1 else base
  _str = show round
  (_h, _t) = splitAt (length _str - 3) _str
  h = if null _h then "0" else _h
  t = if length _t < 3 then _t ++ replicate (3 - length _t) '0' else _t
  in h ++ "." ++ t