C - Cream puff 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MB

配点 : 300

問題文

N 個のシュークリームがあります。

シュークリームを分割することなく平等に分けることができるような人数としてあり得るものを全て求めてください。

制約

  • 1 \leq N \leq 10^{12}
  • N は整数

入力

入力は以下の形式で標準入力から与えられる。

N

出力

答えを改行区切りで昇順に出力せよ。


入力例 1

6

出力例 1

1
2
3
6

例えば、2 人で分けるには 1 人あたり 3 個とすればよいです。


入力例 2

720

出力例 2

1
2
3
4
5
6
8
9
10
12
15
16
18
20
24
30
36
40
45
48
60
72
80
90
120
144
180
240
360
720

入力例 3

1000000007

出力例 3

1
1000000007

Score : 300 points

Problem Statement

We have N cream puffs.

Find all possible number of people to which we can evenly distribute the cream puffs without cutting them.

Constraints

  • 1 \leq N \leq 10^{12}
  • N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print the numbers of people in ascending order, each in its own line.


Sample Input 1

6

Sample Output 1

1
2
3
6

For example, we can evenly distribute the cream puffs to two people by giving three to each person.


Sample Input 2

720

Sample Output 2

1
2
3
4
5
6
8
9
10
12
15
16
18
20
24
30
36
40
45
48
60
72
80
90
120
144
180
240
360
720

Sample Input 3

1000000007

Sample Output 3

1
1000000007