Brilliant Sequence of Umbrellas

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Anton has nn umbrellas, each of them has a different number from 11 to nn written on it. He wants to arrange some of the umbrellas in line so that they would form a brilliant sequence of umbrellas (BSU). A sequence of kk umbrellas with numbers a_1,a_2,,a_ka\_1, a\_2, \ldots, a\_k is considered a BSU if the following rules apply:

  • a_i>a_i1a\_i > a\_{i-1} for all 2ik2 \le i \le k;
  • gcd(a_i,a_i1)>gcd(a_i1,a_i2)\text{gcd}(a\_i, a\_{i-1}) > \text{gcd}(a\_{i-1}, a\_{i-2}) for all 3ik3 \le i \le k. Here, gcd(x,y)\text{gcd}(x, y) denotes the greatest common divisor of integers xx and yy.

Anton would like to create a long BSU. Making the longest one doesn't bother him, he thinks that a BSU of length at least 23n\left\lceil\frac{2}{3}\sqrt{n}\right\rceil is quite enough.

Anton is busy reading fascinating books about lighthouses, so he asks you to find a BSU that would satisfy him.

입력

The only line contains an integer nn, the number of umbrellas (1n10121 \le n \le 10^{12}).

출력

The first line should contain an integer kk, the length of the BSU you have found (23nk106\left\lceil\frac{2}{3}\sqrt{n}\right\rceil \le k \le 10^6).

The second line should contain kk integers a_ia\_i, the sequence itself (1a_in1 \le a\_i \le n). The sequence should satisfy the rules mentioned above.

힌트

In the first example, 2310=3\left\lceil \frac{2}{3} \cdot \sqrt{10} \right\rceil = 3, gcd(1,2)=1\text{gcd}(1, 2) = 1, gcd(2,6)=2\text{gcd}(2, 6) = 2.

In the second example, 2322=4\left\lceil \frac{2}{3} \cdot \sqrt{22} \right\rceil = 4, gcd(1,2)=1\text{gcd}(1, 2) = 1, gcd(2,6)=2\text{gcd}(2, 6) = 2, gcd(6,15)=3\text{gcd}(6, 15) = 3.