while line = gets
  (a, b, c, d, e, f) = line.split().map(&:to_f)
  z = a*e - b*d
  x = (c*e - b*f) == 0 ? 0.0 : (c*e - b*f) / z
  y = (a*f - c*d) == 0 ? 0.0 : (a*f - c*d) / z
  puts sprintf("%.3f %.3f", x, y)
end