import Text.Printf
main = do
  s <- getContents
  let v = map (map read . words) . lines $ s 
  let w = map acc v
  mapM_ putStrLn w

acc :: [Int] -> String
acc [a,b,c,d,e,f] = (printf "%.3f" . sig $ x) ++ " " ++ (printf "%.3f" . sig $ y)
  where
    det = fromIntegral(a*e - b*d) :: Double
    x = fromIntegral(e*c-b*f) / det 
    y = fromIntegral(-c*d+a*f) /det 
    sig x = if x==0.0 then 0.0 else  x