import Text.Printf

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

format :: [Double] -> String
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