import           Control.Applicative
import           Control.Monad
import           Data.List
import           Text.Printf

main :: IO ()
main = (mapM_ (sovle . map (read :: String -> Double) . words) . lines) =<< getContents
  where
    rnd x = if abs x < 0.001 then 0.0 else x
    sovle [a,b,c,d,e,f]
      | det /= 0 = printf "%.3f %.3f\n" (rnd (det1/det)) (rnd (det2/det))
      where
        det = a*e - b*d
        det1 = c*e - b*f
        det2 = a*f - c*d
