{-# OPTIONS_GHC -Wall -Werror #-}

import Text.Printf
import System.IO

fixZero :: Float -> Float
fixZero x = if x == 0 then 0.0 else x

main :: IO ()
main = do
  end <- isEOF
  if end then return ()
         else do
           input <- getLine
           let a:b:c:d:e:f:_ = map read $ words input :: [Float]
               det = (a * e - d * b)
               x = fixZero $ (c * e - f * b) / det
               y = fixZero $ (a * f - d * c) / det
           printf "%.3f %.3f\n" x y
           main