Codeforces Round 319 (Div. 2)
C
Vasya and Petya's Game
Codeforces
未评级
原题
← BD →
翻译中…

Vasya and Petya are playing a simple game. Vasya thought of number $*x*$ between $1$ and $*n*$, and Petya tries to guess the number.

翻译中…

Petya can ask questions like: "Is the unknown number divisible by number $*y*$?".

翻译中…

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

翻译中…

Unfortunately, Petya is not familiar with the number theory. Help him find the minimum number of questions he should ask to make a guaranteed guess of Vasya's number, and the numbers $*y*_{*i*}$, he should ask the questions about.

翻译中…

Input

翻译中…

A single line contains number $*n*$ ($1 ≤ *n* ≤ 10^{3}$).

翻译中…

Output

翻译中…

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.

翻译中…

Note

翻译中…

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.

翻译中…

样例

Input #1
4
Output #1
3
2 4 3
InputCopy OutputCopy
Input #2
6
Output #2
4
2 4 3 5
InputCopy OutputCopy
题目信息
题号
577C
时间限制
1 s
内存限制
256 MB

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。