import Text.Printf

solve1 :: (Double, Double, Double, Double, Double, Double) -> (Double, Double)
solve1 (_, b, c, d, e, f) = (x, y)
    where y = c / b
          x = (f - e * y) / d

solve2 :: (Double, Double, Double, Double, Double, Double) -> (Double, Double)
solve2 (a, b, c, d, e, f) = (x, y)
    where y = (a * f - c * d) / (a * e - b * d)
          x = (c - b * y) / a

solve :: [Double]-> (Double, Double)
solve xs
    | a == 0    = solve1 (a, b, c, d, e, f)
    | otherwise = solve2 (a, b, c, d, e, f)
        where a = xs !! 0
              b = xs !! 1
              c = xs !! 2
              d = xs !! 3
              e = xs !! 4
              f = xs !! 5

format :: (Double, Double) -> String
format (x, y) = printf "%.3f %.3f" x y

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