Problem: After playing with her beautiful array, Mishka decided to learn some math. After learning how to multiply, divide and what is divisibility, she is now interested in solving the following problem.

You are given integer k and array a1, a2, ..., an of n integers. You are to find non-empty subsequence of array elements such that the product of its elements is divisible by k and it contains minimum possible number of elements.

Formally, you are to find a sequence of indices 1 ≤ i1 < i2 < ... < im ≤ n such that <image> is divisible by k while m is minimum possible among all such variants.

If there are more than one such subsequences, you should choose one among them, such that sum of its elements is minimum possible.

Mishka quickly solved this problem. Will you do so?

Input

The first line of the input contains two integers n and k (1 ≤ n ≤ 1 000, 1 ≤ k ≤ 1012).

The second line of the input contains n integers a1, a2, ..., an (1 ≤ ai ≤ 1012) — array elements.

Output

Print single positive integer m in the first line — the number of elements in desired sequence.

In the second line print m distinct integers — the sequence of indices of given array elements, which should be taken into the desired sequence. 

If there are more than one such subsequence (e.g. subsequence of minimum possible number of elements and with minimum possible sum of elements), you can print any of them.

If there are no such subsequences, print  - 1 in the only line.

Example

Input

5 60
2 4 6 5 2


Output

3
4 3 1 

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class mishka_divisors {
	static BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
	static PrintWriter writer = new PrintWriter(System.out);
	static StringTokenizer tokener = null;
 
 
	static String nextToken() throws IOException {
		while (tokener == null || !tokener.hasMoreTokens()) {
			tokener = new StringTokenizer(reader.readLine());
		}
		return tokener.nextToken();
	}
 
	static int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
 
	static long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
 
	static double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	static List<Long> keys;
	static List<Integer> vals;
	
	static int getKey(int[] tvs) {
		int res=0;
		int p=1;
		for (int i=0;i<vals.size();++i) {
			res+=tvs[i] * p;
			p *= (vals.get(i) + 1);
		}
		return res;
	}
	
    public static void main(String[] args) throws IOException {
        int n=nextInt();
        long k=nextLong();
        long[] vs=new long[n];
        for (int i=0;i<n;++i)vs[i]=nextLong();
        
        if (k==1) {
        	writer.println("1");
        	int min=0;
            for (int i=1;i<n;++i){
            	if (vs[i] < vs[min])min=i;
            }
        	writer.println(min + 1);
        	writer.flush();
        	return;
        }
        
        boolean[] notp=new boolean[1000001];
        keys=new ArrayList<Long>();
        vals=new ArrayList<Integer>();
        
        for (int i=2;k>1 && i<notp.length;++i) {
        	if (!notp[i]) {
        		if (k%i==0){
        			int v=0;
        			while(k%i==0){
        				++v;
        				k/=i;
        			}
        			keys.add((long)i);
        			vals.add(v);
        		}
        		if (1L * i*i<=notp.length) {
	        		int tv=i+i;
	        		while(tv<notp.length){
	        			notp[tv]=true;
	        			tv+=i;
	        		}
        		}
        	}
        }
        if (k>1) {
			keys.add(k);
			vals.add(1);
        }  
        int cap=1;
        for (int vv:vals){
        	cap*=(vv+1);
        }
        int[] rnd = new int[vals.size()];
        for (int i=0;i<vals.size();++i)rnd[i]=vals.get(i);
        int rnode = getKey(rnd);
        
        long[][] best=new long[n+1][cap];
        int[][] prev=new int[n+1][cap];
		long I = Long.MAX_VALUE / 3 * 2;
		for(int i = 0;i <= n;i++){
			Arrays.fill(best[i], I);
			Arrays.fill(prev[i], -1);
		}
		best[0][0] = 0;
		int[] nvs=new int[rnd.length];
        int[] cans=new int[rnd.length];
        for (int i=0;i<n;++i) {
    		long tv=vs[i];     	
        	for (int j=0; j<rnd.length;++j) {
        		long p=keys.get(j);
        		int v=0;
        		while(v<rnd[j]) {
        			if (tv%p!=0)break;
        			++v;
        			tv/=p;
        		}
        		cans[j] = v;
        	}
        	
        	for (int j=0;j<cap;++j){best[i+1][j]=best[i][j]; prev[i+1][j] = j;}
        	for (int j=0;j<cap;++j) {
        		if (best[i][j]>=I)continue;
        		int ovs=j;
        		int nkey=0;
        		int tp=1;
        		for (int p=0;p<nvs.length; ++p){
        			int tb=Math.min(rnd[p], (int)(ovs % (rnd[p] + 1)) + cans[p]);
        			nkey+= tb * tp;
        			tp*=(rnd[p] + 1);
        			ovs /= (rnd[p] + 1);
        		}

        		long nv = (1L<<51) + best[i][j] + vs[i];
        		if (best[i+1][nkey] > nv)  {
        			best[i+1][nkey] = nv;
        			prev[i+1][nkey] = j;
        		}
        	}      
        }
        
        if (best[n][rnode]<I) {
	        long rv = best[n][rnode];
	        writer.println(rv >> 51);
	        int c=rnode;
	        String rstr="";
	        for (int i=n-1;i>=0;--i) {
		        int pc=prev[i+1][c];
	        	if (c!=pc) {
	        		rstr+=(i+1) + " ";
	        	}
	        	c=pc;
	        }
	        writer.println(rstr);
        } else {
        	writer.println("-1");
        }
        
        writer.flush();
    }
}