#P1148G. Gold Experience

    ID: 2590 Type: RemoteJudge 2000ms 1024MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>constructive algorithmsgraphsmathnumber theoryprobabilities*3300

Gold Experience

No submission language available for this problem.

Description

Consider an undirected graph GG with nn vertices. There is a value aia_i in each vertex.

Two vertices ii and jj are connected with an edge if and only if gcd(ai,aj)>1gcd(a_i, a_j) > 1, where gcd(x,y)gcd(x, y) denotes the greatest common divisor (GCD) of integers xx and yy.

Consider a set of vertices. Let's call a vertex in this set fair if it is connected with an edge with all other vertices in this set.

You need to find a set of kk vertices (where kk is a given integer, 2kn2 \cdot k \le n) where all vertices are fair or all vertices are not fair. One can show that such a set always exists.

The first line contains integers nn and kk (62kn1056 \leq 2 \cdot k \leq n \leq 10^5) — the number of vertices and parameter kk.

The second line contains nn integers a1,a2,,ana_1, a_2, \ldots, a_n (2ai1072 \le a_i \le 10^7) — the values in the vertices.

Print exactly kk distinct integers — the indices of the vertices in the chosen set in any order.

Input

The first line contains integers nn and kk (62kn1056 \leq 2 \cdot k \leq n \leq 10^5) — the number of vertices and parameter kk.

The second line contains nn integers a1,a2,,ana_1, a_2, \ldots, a_n (2ai1072 \le a_i \le 10^7) — the values in the vertices.

Output

Print exactly kk distinct integers — the indices of the vertices in the chosen set in any order.

Samples

Sample Input 1

6 3
6 15 10 8 14 12

Sample Output 1

2 4 5

Sample Input 2

8 4
11 15 10 6 21 15 10 6

Sample Output 2

5 7 1 2

Sample Input 3

10 5
3003 17017 3230 49742 546 41990 17765 570 21945 36465

Sample Output 3

1 2 4 5 6

Note

In the first test case, set {2,4,5}\{2, 4, 5\} is an example of set where no vertices are fair. The vertex 22 does not share an edge with vertex 44 since gcd(15,8)=1gcd(15, 8) = 1. The vertex 44 does not share an edge with vertex 22. The vertex 55 does not share an edge with vertex 22.

In the second test case, set {8,5,6,4}\{8, 5, 6, 4\} is an example of a set where all vertices are fair.