import Data.Fixed

solve :: RealFrac a => [a] -> [String]
solve (_:_:_:_:_:_:[]) = []
solve (a:b:c:d:e:f:xs) = showSolution ((b*f-c*e)/(b*d-a*e)) ((a*f-c*d)/(a*e-b*d)) : solve xs
    where
        showSolution x y = showE3 x ++ " " ++ showE3 y
        showE3 x = show ((fromIntegral (round (1000 * x)) / 1000) :: Milli)

main = getContents >>= mapM_ putStrLn . solve . (++[0,0,0,0,0,0]) . map read . words