while str = gets do
    a, b, c, d, e, f = str.chomp.split(" ").map(&:to_f)
    y = (c * d - a * f) / (b * d - a * e)
    x = (c - b * y) / a
    puts sprintf("%.3f",x.round(3)) + " " + sprintf("%.3f", y.round(3))
end