import Data.Function (fix)
import Control.Monad
import System.IO
import Text.Printf
main :: IO ()
main = fix $ \loop -> do
     end <- isEOF
     unless end $ do
       a:b:c:d:e:f:_ <- map read . words <$> getLine
       let (x,y) = solve a b c d e f
       printf "%.3f %.3f" x y
       loop


solve :: Double -> Double -> Double -> Double -> Double -> Double -> (Double, Double)
solve a b c d e f = (x,y)
  where
    x = (e * c - b * f) / (a * e - d * b)
    y = (a * f - d * c) / (a * e - d * b)