while (str = gets)
  a, b, c, d, e, f = str.split(" ").map(&:to_f)
  if a * b * d * e != 0
    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(" ")
  else
    if a == 0
      puts [sprintf("%.3f", ((f - e * (c / b)) / d).round(3)), sprintf("%.3f", (c / b).round(3))].join(" ")
    elsif b == 0
      puts [sprintf("%.3f", (c / a).round(3)), sprintf("%.3f", ((f - d * (c / a)) / e).round(3))].join(" ")
    elsif d == 0
      puts [sprintf("%.3f", ((c - b * (f / e)) / a).round(3)), sprintf("%.3f", (f / e).round(3))].join(" ")
    else
      puts [sprintf("%.3f", (f / d).round(3)), sprintf("%.3f", ((c - a * (f / d)) / b).round(3))].join(" ")
    end
  end
end