import Control.Applicative
import Text.Printf

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

main :: IO ()
main = do
    rs <- (map solve . map (map (read :: String -> Double)) . map words . lines) <$> getContents
    mapM_ (\[x, y] -> printf "%.3g %.3g\n" x y) rs