import Control.Applicative
import Text.Printf

main = interact $ unlines.solve'.map (map read.words).lines

solve' :: [[Double]] -> [String]
solve' []     = []
solve' (x:xs) = (format.solve $ x) : solve' xs
    where format [x, y] = printf "%.3f %.3f" x y

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