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