loop do
  line = gets

  break unless line

  a, b, c, d, e, f = line.split.map(&:to_f)

  det = a*e-b*d
  x = (e*c-b*f)/det ; y = (a*f-c*d)/det

  x = 0.0 if x == -0.0
  y = 0.0 if y == -0.0

  printf( "%.3f %.3f\n", x, y )
end