Pocetna test 2 - UMKS zimski kamp 2019

Start

2019-01-13 12:15 UTC

Pocetna test 2 - UMKS zimski kamp 2019

End

2019-01-13 15:00 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -281 days 21:27:16

Time elapsed

2:45:00

Time remaining

0:00:00

Problem E
Candy 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