97,1,1,1 and 25,25,25,25 are indeed the extreme answers.

To understand this, it might be easier to first consider the three-dimensional equivalent. You’ve got a box, with dimensions A by B by C, where A, B, and C add up to some number. I can decrease any side by 1, and increase some other side by 1, and the sum will remain the same. In face, I can get any set of sides I want, by doing this repeatedly. Let’s say that we start with a box where, without loss of generality, A is the longest side, and C is the shortest side. If I decrease side A by 1, I’ll then decrease the volume of the box by an amount (B*C). If I then increase C by 1 (bringing me back up to the same sum), I’ll increase the volume of the box by an amount (A-1)*B. As long as A-1 > C, this is a net increase in the volume of the box, and if (A-1) = C, then it’s no change at all. So if I keep on decreasing the longest side and increasing the shortest side until they differ by at most 1, then at every step, the volume will increase, until it can’t increase any more when all the sides are equal or as near as possible to equal. Likewise, if I keep making the shortest side shorter and the longest side longer, the volume will decrease, until they’re as different as possible.

With four numbers, it works the same way, except that the box is now four-dimensional.