import Text.Printf
solv' :: [Float] -> [Float]
solv' (a:b:c:d:e:f:_) = map (\(x:y:_)-> x * c + f * y) . map (map (*(1 / (a*e-b*d)))) $ [[e, -b], [-d, a]]

solv :: String -> String
solv l = printf "%.000f %.000f" x y
    where (x:y:_) = solv' . map read . words $ l

main = interact (unlines . map solv . lines)