Optimizing the sum of linear fractional functions