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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;

public class E {
	 private static final int INF = 114514;

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
		int n = in.nextInt();
		long k = in.nextLong();
		long[] a = new long[n];
		for(int i=0;i<n;i++){
			a[i] = in.nextLong();
		}
		
        if (k == 1) {
            out.println(1);
            int minIdx = -1;
            long min = (long)1e18;
            for (int i = 0; i < n ; i++) {
                if (min > a[i]) {
                    min = a[i];
                    minIdx = i+1;
                }
            }
            out.println(minIdx);
            out.flush();
            return;
        }
        
//		System.out.println(a);
		//defactorize k
		int[] kp = new int[13];
		int[] prime = new int[13];
		int pc = 0;
		for(int i=2; (long)i*i <= k; i++){
			if(k%i == 0){
				while(k % i == 0){
					kp[pc]++;
					k /= i;
				}
				prime[pc] = i;
				pc++;
			}
		}
		if(k!=1){
			kp[pc] = 1;
			prime[pc] = (int) k;
			pc++;
		};
		//defactorize a's
		int[][] ap = new int[n][pc];
		for(int i=0;i<n;i++){
			long aa = a[i];
			for(int j=0;j<pc;j++){
				int p = prime[j];
				while(aa % p == 0){
					ap[i][j]++;
					aa /= p;
				}
			}
		}
		
//		System.out.println(ap);
		int divsCount = 1;
		for(int i=0;i<pc;i++){
			divsCount *= kp[i]+1;
		}
		
		int[] mul = new int[pc];
		mul[pc-1] = 1;
		for(int i = pc-2;i>=0;i--){
			mul[i] = mul[i+1] * (kp[i+1]+1);
//			out.println(mul[i]);
		}
		
		int[][] dp = new int[n+1][divsCount];
		long[][] sum = new long[n+1][divsCount];
		int[][] prev = new int[n+1][divsCount];
		
		for(int i=0; i<=n; i++){
			Arrays.fill(dp[i], INF);
		}
		dp[0][0] = 0;
		
		for(int i=0;i<n;i++){
			for(int j=0;j<divsCount;j++){
				if(dp[i][j] == INF) continue;
				
				int base = dp[i][j];
				long cursum =  sum[i][j];
				
				if(dp[i+1][j] > base || (dp[i+1][j] == base && sum[i+1][j] > cursum)){
					dp[i+1][j] = base;
					sum[i+1][j] = cursum;
					prev[i+1][j] = j;
				}
				
				int next = 0; int cur = j;
				for(int q = 0; q < pc; q++){
					next += mul[q] * Math.min(kp[q], cur / mul[q] + ap[i][q]);
					cur %= mul[q];
				}
				if(dp[i+1][next] > base+1 || (dp[i+1][next] == base + 1 && sum[i+1][next] > cursum + a[i])){
					dp[i+1][next] = base+1;
					sum[i+1][next] = cursum + a[i];
					prev[i+1][next] = j;
				}
//				out.println(i + " " + j + " " + next + " " + dp[i+1][j] + " " + dp[i+1][next]);
			}
		}
		
		if(dp[n][divsCount-1] == INF){
			out.println(-1);
			out.flush();
			return;
		}
		
		out.println(dp[n][divsCount-1]);
		StringBuilder bf = new StringBuilder();
		for(int i=n, j = divsCount -1 ; j >0; j = prev[i--][j]){
			if(prev[i][j] < j){
				bf.append(i).append( " ");
			}
		}
		out.println(bf.toString());
		out.flush();
		return;
	}


    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        
        public long nextLong(){
        	return Long.parseLong(next());
        }

    }
}