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

#GL0000211. Liệt kê các thương nguyên phân biệt (Enumerate Quotients)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Liệt kê các thương nguyên phân biệt (Enumerate Quotients)

Liệt kê các thương nguyên phân biệt (Enumerate Quotients)

Source: Library Checker

Version: Phuoc Hung OJ Extended

Problem Statement

Given a positive integer NN, define the set

$$S=\left\{\left\lfloor\frac{N}{i}\right\rfloor\mid i\in\mathbb Z,\ 1\le i\le N\right\}.$$

Print every distinct member of SS in strictly ascending order.

Input

One line contains NN.

Output

Print K=∣S∣K=|S| on the first line. On the next line print the KK values in strictly increasing order.

Subtasks

  • Subtask 1 (20 points): 1≤N≤100001\le N\le 10000.

  • Subtask 2 (30 points): 1≤N≤1000000001\le N\le 100000000.

  • Subtask 3 (50 points): 1≤N≤10000000000001\le N\le 1000000000000.

Examples

Example 1

Input

10

Output

5
1 2 3 5 10

Explanation

The quotients for indices 1 through 10 are 10, 5, 3, 2, 2, 1, 1, 1, 1, 1. Remove duplicates and print ascending.

Example 2

Input

1

Output

1
1

Explanation

There is exactly one index, so the only quotient is 1.