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.io.PrintStream;
import java.util.Arrays;
import java.io.BufferedInputStream;
import java.util.InputMismatchException;
import java.io.IOException;
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;
		BufferedInputStream in = new BufferedInputStream(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskE {
		static final int MAXSQRT = (int) 1e6 + 1;
		static boolean[] isPrime = new boolean[MAXSQRT];
		static int nprime = 0;
		static int[] prime = new int[100000];
		int[] suffixProduct = new int[100];
		int np = 0;
		long[] lprime = new long[100];
		int[] lcnt = new int[100];
		int[][] allState;
		int nState = 0;

		static {
			Arrays.fill(isPrime, true);
			isPrime[0] = false;
			isPrime[1] = false;
			for (int i = 2; i < MAXSQRT; ++i)
				if (isPrime[i]) {
					int j = i + i;
					while (j < MAXSQRT) {
						isPrime[j] = false;
						j += i;
					}
				}


			for (int i = 2; i < MAXSQRT; ++i)
				if (isPrime[i]) {
					prime[nprime++] = i;
				}

			System.err.println(nprime);
		}

		public void getPrimeFactor(long n) {
			np = 0;
			if (n <= 1) return;

			for (int i = 0; i < nprime; ++i)
				if (n % prime[i] == 0) {
					lprime[np] = prime[i];
					lcnt[np] = 0;
					while (n % prime[i] == 0) {
						lcnt[np]++;
						n /= prime[i];
					}
					np++;
					if (n == 1) break;
				}
			if (n > 1) {
				lprime[np] = n;
				lcnt[np] = 1;
				np++;
			}
		}

		void genState(int id, int[] st) {
			if (id >= st.length) {
//			for (int i = 0; i < st.length; ++i) {
//				System.err.print(st[i] + " ");
//
//			}
//			System.err.println();
//			ArrayList<Integer> newState = new ArrayList<>(st.length);
//			for (int i = 0; i < st.length; ++i) newState.add(st[i]);
//			mapState.put(newState, listState.size());
//
//			listState.add(newState);
				allState[nState++] = st.clone();
			} else {
				for (int i = 0; i <= lcnt[id]; ++i) {
					st[id] = i;
					genState(id + 1, st);
					st[id] = 0;
				}
			}
		}

		public void addState(int[] s1, int[] s2, int[] ret) {
			for (int i = 0; i < np; ++i) {
				int tmp = s1[i] + s2[i];
				tmp = Math.min(tmp, lcnt[i]);
				ret[i] = tmp;
			}

		}

		public int getId(int[] st) {
			int re = 0;
			for (int i = 0; i < np - 1; ++i) {
				re += st[i] * suffixProduct[i + 1];
			}

			return re + st[np - 1];
		}

		public void solve(int testNumber, BufferedInputStream _in, PrintWriter out) {
			InputReader in = new InputReader(_in);
			long startTime = System.currentTimeMillis();
			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);
				out.println(MathUtils.min(a) + 1);
			} else {

				getPrimeFactor(k);
				int[] st = new int[np];

				suffixProduct[np - 1] = lcnt[np - 1] + 1;
				for (int i = np - 2; i >= 0; --i) {
					suffixProduct[i] = suffixProduct[i + 1] * (lcnt[i] + 1);
				}

				int[][] aa = new int[n][np];
				allState = new int[suffixProduct[0]][];
				genState(0, st);

				for (int i = 0; i < n; ++i) {

					long val = a[i];
					for (int j = 0; j < np; ++j) {
						int cnt = 0;

						while (val % lprime[j] == 0) {
							val /= lprime[j];
							cnt++;
						}
						cnt = Math.min(cnt, lcnt[j]);
						aa[i][j] = cnt;
					}

				}

				long INF = (long) 1e16 + 1;
				long[] dp = new long[nState];
				long[] dpSum = new long[nState];
				int[] pr = new int[nState];
				int[] save = new int[nState];

				Arrays.fill(dp, INF);
				Arrays.fill(dpSum, INF);
				Arrays.fill(pr, -1);

				dp[0] = 0;
				dpSum[0] = 0;

				int[] stTemp = new int[np];

				for (int i = 0; i < n; ++i) {
					int xx = 0;
					for (int j = nState - 1; j >= 0; --j)
						if (dp[j] != INF) {
							addState(aa[i], allState[j], stTemp);
							int tempId = getId(stTemp);

							if (tempId < j) throw new RuntimeException();
							if (dp[tempId] > dp[j] + 1 || (dp[tempId] == dp[j] + 1 && dpSum[tempId] > dpSum[j] + a[i])) {
								dp[tempId] = dp[j] + 1;
								dpSum[tempId] = dpSum[j] + a[i];
								pr[tempId] = j;
								save[tempId] = i;
							}
						}

				}

				if (dp[nState - 1] == INF) {
					out.println(-1);
				} else {
					for (int i = 0; i < np; ++i) stTemp[i] = lcnt[i];
					int[] st2 = new int[np];
					int curState = nState - 1;
					ArrayList<Integer> ret = new ArrayList<>();

					boolean[] black = new boolean[n];

					for (int ii = 0; ii < dp[nState - 1]; ++ii) {
						int okbd = -1;
						for (int s = curState - 1; s >= 0; s--) {

							if (dp[s] + 1 == dp[curState]) {

								for (int bd = n - 1; bd >= 0; --bd)
									if (!black[bd] && dpSum[s] + a[bd] == dpSum[curState]) {
										addState(allState[s], aa[bd], st2);
										int tmpId = getId(st2);
										if (tmpId == curState) {
											okbd = bd;
											curState = s;
											break;
										}
									}

							}

							if (okbd != -1) break;
						}

						if (okbd == -1) throw new RuntimeException();
						black[okbd] = true;
						ret.add(okbd);
					}

					if (dp[nState - 1] != ret.size())
						throw new RuntimeException(" dp " + dp[nState - 1] + " ret.size " + ret.size());
					out.println(ret.size());
					for (int i = 0; i < ret.size(); ++i) out.print((ret.get(i) + 1) + " ");
				}

			}


			in.close();
			System.err.println("Time: " + (System.currentTimeMillis() - startTime) + " miliseconds");
		}

	}

	static class MathUtils {
		public static int min(long[] a) {
			if (a.length == 0)
				throw new RuntimeException();

			long ret = a[0];
			int save = 0;

			for (int i = 1; i < a.length; ++i)
				if (a[i] < ret) {
					ret = a[i];
					save = i;
				}

			return save;
		}

	}

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

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

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

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

		public void close() {

		}

	}
}