import Text.Printf
main = getContents >>= mapM_ (fout . simultaneous_equation . fin) . lines
fin = map (read::String->Double) . words
fout (x,y) = printf "%.3f %.3f\n" x y
 
simultaneous_equation [a,b,c,d,e,f] = (x,y)
 where x = (c - b*y) / a
       y = (c*d - a*f) / (b*d - a*e)