A set of events is given by an array of integers ai.
You believe that from event number i, event number j could be anticipated if both of the following conditions are true:
A chain of events, where each subsequent event could be anticipated from the previous one, is called a conspiracy.
Prove to everyone that your conspiracy theory is not just a theory — find a conspiracy consisting of the largest number of events.
The first line contains an integer n (1 ≤ n ≤ 106) — the number of events.
The second line contains n integers a1, a2, ..., an (1 ≤ aj ≤ 2·106) — the parameters of the events.
In the first line, output an integer k (1 ≤ k ≤ n) — the maximum possible size of the conspiracy.
In the second line, output k integers pj (1 ≤ pj ≤ n) separated by spaces — the indices of these events in the order of anticipation.
In case there are multiple conspiracies of maximum size, output any of them.
5
1 2 3 4 5
2
2 4
8
8 7 10 3 6 5 3 11
4
4 5 1 3
3
2 2 2
1
1
First test case
The sequence [2;4] is a conspiracy, as from the event a2 = 2 one can predict a4 = 4:
(
— greatest common divisor). Second test case
The sequence [4;5, 1, 3] is a conspiracy, as:
;
;
. Third test case
In this example, a conspiracy of any two events is impossible, as all ai are equal to each other.
At the same time, any event is formally a conspiracy by itself, so the size of the answer is always at least 1.
| Name |
|---|


