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:
// package codeforces.cf3xx.cf365.div2;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;

/**
 * Created by hama_du on 2016/08/06.
 */
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 = in.nextLongs(n);
        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;
        }
        long[] pr = new long[13];
        int[] pc = new int[13];
        int pn = 0;
        {

            long K = k;
            int[] p = generatePrimes(1000000);
            for (int i = 0 ; i < p.length ; i++) {
                if (K < p[i]) {
                    break;
                }
                int ct = 0;
                while (K % p[i] == 0) {
                    K /= p[i];
                    ct++;
                }
                if (ct >= 1) {
                    pr[pn] = p[i];
                    pc[pn++] = ct;
                }
            }
            if (K >= 2) {
                pr[pn] = K;
                pc[pn++] = 1;
            }
        }

        int[][] ainc = new int[n][pn];
        for (int i = 0; i < n ; i++) {
            long A = a[i];
            for (int j = 0; j < pn ; j++) {
                while (A % pr[j] == 0) {
                    A /= pr[j];
                    ainc[i][j]++;
                }
            }
        }

        int cnt = 1;
        for (int i = 0; i < pn ; i++) {
            cnt *= pc[i]+1;
        }
        int[][] decodeTable = new int[cnt][pn];
        for (int i = 0; i < cnt ; i++) {
            int I = i;
            for (int j = 0; j < pn ; j++) {
                decodeTable[i][j] = I % (pc[j]+1);
                I -= decodeTable[i][j];
                I /= pc[j]+1;
            }
        }

        int[][] dp = new int[n+1][cnt];
        long[][] dp2 = new long[n+1][cnt];
        for (int i = 0; i <= n; i++) {
            Arrays.fill(dp[i], INF);
        }
        dp[0][0] = 0;

        int[][] prev = new int[n+1][cnt];
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < cnt; j++) {
                if (dp[i][j] == INF) {
                    continue;
                }
                int base = dp[i][j];
                long base2 = dp2[i][j];

                // dont use i
                if (dp[i+1][j] > base || (dp[i+1][j] == base && dp2[i+1][j] > base2)) {
                    dp[i+1][j] = base;
                    dp2[i+1][j] = base2;
                    prev[i+1][j] = j;
                }

                // use i
                int tj = 0;
                for (int l = pn-1 ; l >= 0 ; l--) {
                    tj *= (pc[l]+1);
                    tj += Math.min(decodeTable[j][l]+ainc[i][l], pc[l]);
                }
                if (dp[i+1][tj] > base+1 || (dp[i+1][tj] == base+1 && dp2[i+1][tj] > base2+a[i])) {
                    dp[i+1][tj] = base+1;
                    dp2[i+1][tj] = base2+a[i];
                    prev[i+1][tj] = j;
                }
            }
        }
        if (dp[n][cnt-1] == INF) {
            out.println(-1);
        } else {
            StringBuilder idx = new StringBuilder();
            int nowJ = cnt-1;
            int nowI = n;
            while (nowI >= 1) {
                int ti = nowI-1;
                int tj = prev[nowI][nowJ];
                if (nowJ != tj) {
                    idx.append(' ').append(ti+1);
                }
                nowI = ti;
                nowJ = tj;
            }
            out.println(dp[n][cnt-1]);
            out.println(idx.substring(1));
        }
        out.flush();
    }

    static int[] generatePrimes(int upto) {
        boolean[] isp = new boolean[upto];
        Arrays.fill(isp, true);
        isp[0] = isp[1] = false;

        int pi = 0;
        for (int i = 2; i < upto ; i++) {
            if (isp[i]) {
                pi++;
                for (int j = i * 2; j < upto; j += i) {
                    isp[j] = false;
                }
            }
        }

        int[] ret = new int[pi];
        int ri = 0;
        for (int i = 2 ; i < upto ; i++) {
            if (isp[i]) {
                ret[ri++] = i;
            }
        }
        return ret;
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int[] nextInts(int n) {
            int[] ret = new int[n];
            for (int i = 0; i < n; i++) {
                ret[i] = nextInt();
            }
            return ret;
        }


        private int[][] nextIntTable(int n, int m) {
            int[][] ret = new int[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    ret[i][j] = nextInt();
                }
            }
            return ret;
        }

        private long[] nextLongs(int n) {
            long[] ret = new long[n];
            for (int i = 0; i < n; i++) {
                ret[i] = nextLong();
            }
            return ret;
        }

        private long[][] nextLongTable(int n, int m) {
            long[][] ret = new long[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    ret[i][j] = nextLong();
                }
            }
            return ret;
        }

        private double[] nextDoubles(int n) {
            double[] ret = new double[n];
            for (int i = 0; i < n; i++) {
                ret[i] = nextDouble();
            }
            return ret;
        }

        private int next() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public char nextChar() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            if ('a' <= c && c <= 'z') {
                return (char) c;
            }
            if ('A' <= c && c <= 'Z') {
                return (char) c;
            }
            throw new InputMismatchException();
        }

        public String nextToken() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = next();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public int nextInt() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res*sgn;
        }

        public long nextLong() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            long sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c-'0';
                c = next();
            } while (!isSpaceChar(c));
            return res*sgn;
        }

        public double nextDouble() {
            return Double.valueOf(nextToken());
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }
}