Masala A

Xotira 32 MB Vaqt 1000 ms
14

Aziz and Sardor's Game

Aziz and Sardor are playing a simple game. Aziz thought of number \(x\) between \(1\) and \(n\), and Sardor tries to guess the number.

Sardor can ask questions like: "Is the unknown number divisible by number \(y\)?".

The game is played by the following rules: first Sardor asks all the questions that interest him (also, he can ask no questions), and then Aziz responds to each question with \(a\) 'yes' or \(a\) 'no'. After receiving all the answers Sardor should determine the number that Aziz thought of.

Unfortunately, Sardor is not familiar with the number theory. Help him find the minimum number of questions he should ask to make a guaranteed guess of Aziz's number, and the numbers \(y_i\), he should ask the questions about.


Kiruvchi ma'lumotlar:

A single line contains number \( n (1 ≤ n ≤ 10^3). \)


Chiquvchi ma'lumotlar:

Print the length of the sequence of questions \(k (0 ≤ k ≤ n)\), followed by \(k\) numbers — the questions \(y_i (1 ≤ y_i ≤ n).\)

If there are several correct sequences of questions of the minimum length, you are allowed to print any of them.


Misollar
# input.txt output.txt
1
4
3
2 4 3
2
6
4
2 4 3 5
Izoh:

The sequence from the answer to the first sample test is actually correct.

If the unknown number is not divisible by one of the sequence numbers, it is equal to 1.

If the unknown number is divisible by 4, it is 4.

If the unknown number is divisible by 3, then the unknown number is 3.

Otherwise, it is equal to 2. Therefore, the sequence of questions allows you to guess the unknown number. It can be shown that there is no correct sequence of questions of length 2 or shorter.