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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        MishkaAndDivisors solver = new MishkaAndDivisors();
        solver.solve(1, in, out);
        out.close();
    }

    static class MishkaAndDivisors {
        int[] pref;
        int[] msk;
        int MAX = 6720;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();
            long k = in.nextLong();
            long oK = k;
            ArrayList<long[]> primeDivisors = new ArrayList<>();
            int divisors = 1;
            for (int i = 2; i <= 1e6; i++) {
                if (oK % i == 0) {
                    primeDivisors.add(new long[]{i, 0});
                    while (oK % i == 0) {
                        oK /= i;
                        primeDivisors.get(primeDivisors.size() - 1)[1]++;
                    }
                    divisors *= (int) primeDivisors.get(primeDivisors.size() - 1)[1] + 1;
                }
            }
            if (oK > 1) {
                primeDivisors.add(new long[]{oK, 1});
                divisors *= 2;
            }
            pref = new int[primeDivisors.size()];
            msk = new int[pref.length];
            if (k != 1) {
                pref[0] = 1;
                msk[0] = (int) primeDivisors.get(0)[1];
                for (int i = 1; i < pref.length; i++) {
                    pref[i] = (pref[i - 1] * (int) (primeDivisors.get(i - 1)[1] + 1));
                    msk[i] = (int) primeDivisors.get(i)[1];
                }
                State[][] best = new State[N + 1][MAX];
                best[0][0] = new State(0, 0, new ArrayList<>());

                int[][] masks = new int[MAX][msk.length];
                for (int i = 0; i < MAX; i++) {
                    masks[i] = rev(i);
                }
                long res = Long.MAX_VALUE;
                for (int i = 0; i < N; i++) {
                    long a = in.nextLong();
                    if (k == 1) {
                        res = Math.min(a, res);
                        continue;
                    }
                    long tempA = a;
                    int[] next_mask = new int[msk.length];
                    for (int p = 0; p < pref.length; p++) {
                        while (tempA % primeDivisors.get(p)[0] == 0) {
                            next_mask[p]++;
                            tempA /= primeDivisors.get(p)[0];
                        }
                    }
                    for (int j = 0; j < MAX; j++) {
                        best[i + 1][j] = best[i][j];
                    }
                    for (int j = 0; j < MAX; j++) {
                        if (best[i][j] != null) {
                            int next = comb(masks[j], next_mask);
                            if (best[i + 1][next] == null || best[i + 1][next].length > best[i][j].length + 1) {
                                ArrayList<Integer> nxt = (ArrayList<Integer>) best[i][j].indexes.clone();
                                nxt.add(i + 1);
                                best[i + 1][next] = new State(best[i][j].sum + a, best[i][j].length + 1, nxt);
                            } else if (best[i][j].length + 1 == best[i + 1][next].length && best[i][j].sum + a < best[i + 1][next].sum) {
                                ArrayList<Integer> nxt = (ArrayList<Integer>) best[i][j].indexes.clone();
                                nxt.add(i + 1);
                                best[i + 1][next] = new State(best[i][j].sum + a, best[i][j].length + 1, nxt);
                            }
                        }
                    }
                }
                if (best[N][divisors - 1] == null) {
                    out.println(-1);
                } else {
                    out.println(best[N][divisors - 1].length);
                    for (int j : best[N][divisors - 1].indexes) {
                        out.println(j);
                    }
                }
            } else {
                long res = Long.MAX_VALUE;
                long resId = 0;
                for (int i = 0; i < N; i++) {
                    long a = in.nextLong();
                    if (k == 1) {
                        if (res > a) {
                            res = a;
                            resId = i + 1;
                        }
                        continue;
                    }
                }
                out.println(1);
                out.println(resId);
            }
        }

        int comb(int[] a, int[] b) {
            int[] res = new int[a.length];
            for (int i = 0; i < res.length; i++) {
                res[i] = Math.min(a[i] + b[i], msk[i]);
            }
            return conv(res);
        }

        int[] rev(int a) {
            int[] st = new int[pref.length];
            for (int i = pref.length - 1; i >= 0; i--) {
                st[i] = a / pref[i];
                a %= pref[i];
            }
            return st;
        }

        int conv(int[] arr) {
            int cur = 0;
            for (int i = 0; i < arr.length; i++) {
                cur += arr[i] * pref[i];
            }
            return cur;
        }

        class State {
            long sum;
            long length;
            ArrayList<Integer> indexes;

            State(long sum, long length, ArrayList<Integer> indexes) {
                this.indexes = indexes;
                this.length = length;
                this.sum = sum;
            }

        }

    }

    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());
        }

    }
}