YCPC - Weekly Practice (Misc. Probs)

#### Start

2021-06-02 18:25 AKDT

## YCPC - Weekly Practice (Misc. Probs)

#### End

2021-06-09 17:00 AKDT
The end is near!
Contest is over.
Not yet started.
Contest is starting in -53 days 10:26:41

166:35:00

0:00:00

# Problem FCandy Division

Benny has just found out that he has $N$ candies in his pocket. He is always happy to share candies with his friends, because then he doesn’t have to eat them alone and get fat. There is one problem, though. He cannot invite any number of friends, since it would be impossible to divide candies evenly among people.

Given $N$, how many people can Benny invite to eat candies, so that everybody gets the same number of candies and all candies will be eaten?

## Input

The input contains one line with one integer $N$ ($2\leq N\leq 10^{12}$), denoting the number of candies in Benny’s pocket.

## Output

Output one line with all possible number of friends Benny can invite. Output them in ascending order and separate by spaces.

Sample Input 1 Sample Output 1
30

0 1 2 4 5 9 14 29