PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000163. Chia bánh su kem (Cream puff)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Chia bánh su kem (Cream puff)

Cream puff

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

There are NN identical cream puffs. You want to distribute all of them among a positive number of people so that every person receives the same number of whole puffs, with no cutting and no leftovers. Print every possible number of people in increasing order.

Input

One line containing the positive integer NN.

Output

Print each valid number of people on a separate line in increasing order.

Subtasks

  • Subtask 1 (20 points): 1≤N≤1041 \le N \le 10^4.
  • Subtask 2 (30 points): 1≤N≤1081 \le N \le 10^8.
  • Subtask 3 (50 points): 1≤N≤10121 \le N \le 10^12.

Examples

Input

12

Output

1
2
3
4
6
12

Explanation

For 1,2,3,4,6,121,2,3,4,6,12 people, each receives respectively 12,6,4,3,2,112,6,4,3,2,1 whole puffs. Any other positive number of people would leave a remainder.