while (str = gets.chomp) != ""
  a, b, c, d, e, f = str.split(" ").map(&:to_f)
  puts [sprintf("%.3f", ((c - f * (b / e)) / (a - d * (b / e))).round(3)), sprintf("%.3f", ((c - f * (a / d)) / (b - e * (a / d))).round(3))].join(" ")
end