import System.IO (isEOF)
import Text.Printf (printf)

main = do
    quit <- isEOF
    if quit then return () else do
        line <- getLine
        let
            [a,b,s,c,d,t] = map read $ words line :: [Int]
            (x,y) = solve (Equation a b s) (Equation c d t)
        output x y
        main

output :: Double -> Double -> IO ()
output x y = printf "%.3f %.3f\n" x' y'
    where
    x' = if x == -0.0 then 0.0 else x
    y' = if y == -0.0 then 0.0 else y

data Equation = Equation Int Int Int

solve :: Equation -> Equation -> (Double, Double)
solve e1 e2 = (x,y)
    where
    x = fromIntegral (d * s + (-b) * t) / det
    y = fromIntegral ((-c) * s + a * t) / det
    det = fromIntegral (a * d - b * c)
    Equation a b s = e1
    Equation c d t = e2