import Text.Printf

solve :: [Double] -> String
solve [a,b,c,d,e,f] = printf "%.3f %.3f" (s $ (c*e-b*f)/(a*e-b*d)) (s $ (a*f-c*d)/(a*e-b*d))
  where s :: Double -> Double
        s = (/ 1000) . fromIntegral . round . (* 1000)

main = getContents >>= mapM_ putStrLn . map solve . map (map read . words) . lines