Aleague#012

#### Start

2017-09-13 17:00 CEST

## Aleague#012

#### End

2017-09-13 20:30 CEST
The end is near!
Contest is over.
Not yet started.
Contest is starting in -277 days 18:18:38

3:30:00

0:00:00

# Problem EDividing Sequence

You are given an integer $N$. Your task is to find the longest sequence of integers $a_1<a_2<\dots < a_ k$, such that $a_ i$ divides $a_{i+1}$ and $1 \le a_ i \le N$ for all $i$.

## Input

The input contains one line with integer $N, 1\leq N\leq 1\, 000\, 000$.

## Output

The first line of output contains the length of the longest sequence. The second line contains space separated numbers $a_1, \ldots , a_ k$ in increasing order.

Sample Input 1 Sample Output 1
6

3
1 3 6