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

#GL0000110. MEX của các ƯCLN (GCD MEX)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

MEX của các ƯCLN (GCD MEX)

GCD MEX

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Given nn, construct an array aa of length 0≤m≤n0\le m\le n, with 1≤ai≤10181\le a_i\le10^{18}. Form the set BB of GCDs of all distinct pairs of positions. The positive MEX (smallest missing positive integer, equal to 11 for an empty set) must be at least nn.

Input

One line containing nn.

Output

Print mm on the first line, followed by mm array elements. For m=0m=0, print no elements.

Subtasks

  • Subtask 1 (20 points): 1≤n≤91\le n\le9.
  • Subtask 2 (30 points): 1≤n≤201\le n\le20.
  • Subtask 3 (50 points): 1≤n≤301\le n\le30.

Examples

Input

3

Output

3
1 2 4

Explanation

The pairwise GCDs are 1,1,21,1,2, hence B={1,2}B=\{1,2\} and its positive MEX equals 33.