import Data.List
import Data.Char
import Data.Functor
import Text.Printf
import Control.Monad
import System.IO
import qualified Data.ByteString.Char8 as B

getInts :: IO[Int]
getInts = unfoldr (B.readInt . B.dropWhile isSpace) <$> B.getLine

eps :: Float -> Float
eps x = if x==0.0 then 0.0 else x

main = do
  end <- isEOF
  if end then return ()
  else do
    xs <- getInts
    let [a,b,c,d,e,f] = map fromIntegral xs
        x = eps $ (c * e - b * f) / (a * e - b * d)
        y = eps $ (c * d - a * f) / (b * d - a * e)
        in putStrLn $ printf "%.3f %.3f" x y
    main