{-# OPTIONS_GHC -Wall -Werror #-}

import Text.Printf
import System.IO

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]
               z = (a * e - d * b)
               x = (c * e - f * b) / z
               y = (a * f - d * c) / z
           printf "%.3f %.3f\n" x y
           main