Generalized Input

Program generalized. In input you code your function, bounds and minimal
and maximal number of rectangles