A finite algorithm for a class of nonlinear multiplicative programs