import Text.Printf
import System.IO

sign x = if x == 0.0 then 0.0 else x

floatFormat :: Float -> String
floatFormat x = printf "%.10f" x

main = do
    end <- isEOF
    if end then return ()
    else
        do
            line <- getLine
            let [a, b, c, d, e, f] = map read . words $ line
                x = sign $ (c * e - b * f) / (a * e - b * d)
                y = sign $ (c * d - a * f) / (b * d - a * e)
                in putStrLn $ floatFormat x ++ " " ++ show y
            main