import Control.Applicative
import Control.Monad
import Data.List
import Data.Ratio
import Text.Printf
import System.IO

main :: IO ()
main = do
  e <- isEOF 
  when (not e) $ do
    [a,b,c,d,e,f] <- map read . words <$> getLine
    let det = a * e - b * d
    let x0 = (e * c - b * f) % det
    let y0 = (a * f - d * c) % det
    let x = fromRational x0 :: Double
    let y = fromRational y0 :: Double
    printf "%.3f %.3f\n" x y
    main

