while true do
    begin
        a1, b1, c1, a2, b2, c2 = gets.split(" ").map(&:to_i)
        printf("%.3f %.3f\n", (c1*b2 - c2*b1) / (a1*b2 - a2*b1), (a1*c2 - a2*c1) / (a1*b2 - a2*b1))
    rescue
        break
    end
end