import           System.IO
import           Control.Monad
import           Control.Applicative
import           Control.Monad.State
import           Data.List
import           Text.Printf

data Res = Res {
  x :: Double,
  y :: Double
}

instance Show Res where
  show r = (printf "%0.3f" $ x r) ++ " " ++ (printf "%0.3f" $ y r)

toRes :: [Int] -> Res
toRes (a : b : c : d : e : f : _) = Res x y
 where
  y = (fromIntegral (a * f - d * c) / fromIntegral (e * a - b * d))
  x = (fromIntegral c - (fromIntegral b) * y) / fromIntegral a

main = do
  l <- getLine
  let line = toRes $ map (read :: String -> Int) $ words l
  print line
  eof <- isEOF
  unless eof $ main

