#P1091C. New Year and the Sphere Transmission
New Year and the Sphere Transmission
Description
There are people sitting in a circle, numbered from to in the order in which they are seated. That is, for all from to , the people with id and are adjacent. People with id and are adjacent as well.
The person with id initially has a ball. He picks a positive integer at most , and passes the ball to his -th neighbour in the direction of increasing ids, that person passes the ball to his -th neighbour in the same direction, and so on until the person with the id gets the ball back. When he gets it back, people do not pass the ball any more.
For instance, if and , the ball is passed in order .
Consider the set of all people that touched the ball. The fun value of the game is the sum of the ids of people that touched it. In the above example, the fun value would be .
Find and report the set of possible fun values for all choices of positive integer . It can be shown that under the constraints of the problem, the ball always gets back to the -st player after finitely many steps, and there are no more than possible fun values for given .
The only line consists of a single integer () — the number of people playing with the ball.
Suppose the set of all fun values is .
Output a single line containing space separated integers through in increasing order.
Input
The only line consists of a single integer () — the number of people playing with the ball.
Output
Suppose the set of all fun values is .
Output a single line containing space separated integers through in increasing order.
Note
In the first sample, we've already shown that picking yields fun value , as does . Picking results in fun value of . For we get fun value and with or we get .

In the second sample, the values , , , and are achieved for instance for , , , and , respectively.