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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmin(T &x, const T &y) {
  if (x > y) x = y;
}
template <typename T>
void chmax(T &x, const T &y) {
  if (x < y) x = y;
}
int read() {
  char c;
  while ((c = getchar()) < '-')
    ;
  if (c == '-') {
    int x = (c = getchar()) - '0';
    while ((c = getchar()) >= '0') x = x * 10 + c - '0';
    return -x;
  }
  int x = c - '0';
  while ((c = getchar()) >= '0') x = x * 10 + c - '0';
  return x;
}
const int N = 1000 + 5, T = 6800;
int n;
long long a[N];
long long k;
long long pr[30];
int cnt[30], w[30], tot;
int dp1[N][T];
long long dp2[N][T];
int *f0, *f1;
long long *g0, *g1;
void fen(long long k) {
  int g = sqrt(k);
  for (int i = 2; i <= g; ++i)
    if (k % i == 0) {
      pr[tot] = i;
      while (k % i == 0) {
        k /= i;
        ++cnt[tot];
      }
      ++tot;
    }
  if (k > 1) {
    pr[tot] = k;
    cnt[tot] = 1;
    ++tot;
  }
  w[tot] = 1;
  for (int i = tot - 1, i_l = 0; i >= i_l; --i)
    w[i] = w[i + 1] * (cnt[i + 1] + 1);
}
int ncnt[30];
long long nx;
void get(long long x) {
  nx = x;
  for (int i = 0, i_r = tot - 1; i <= i_r; ++i) {
    int j = 0;
    while (x % pr[i] == 0) {
      ++j;
      x /= pr[i];
    }
    ncnt[i] = min(cnt[i], j);
  }
}
void dfs(int nw, int ni, int tw) {
  if (ni >= tot) {
    if (f0[nw] < f0[tw] + 1 ||
        (f0[nw] == f0[tw] + 1 && g0[nw] <= g0[tw] + nx)) {
      f1[nw] = f0[nw];
      g1[nw] = g0[nw];
    } else {
      f1[nw] = f0[tw] + 1;
      g1[nw] = g0[tw] + nx;
    }
    return;
  }
  int j = 0;
  for (; j <= ncnt[ni]; ++j) {
    dfs(nw, ni + 1, tw);
    nw += w[ni];
  }
  for (; j <= cnt[ni]; ++j) {
    tw += w[ni];
    dfs(nw, ni + 1, tw);
    nw += w[ni];
  }
}
int main() {
  cin >> n >> k;
  for (int i = 1, i_r = n; i <= i_r; ++i) scanf("%lld", &a[i]);
  if (k == 1) {
    puts("1");
    long long mn = a[1];
    int mni = 1;
    for (int i = 2, i_r = n; i <= i_r; ++i)
      if (a[i] < mn) {
        mn = a[i];
        mni = i;
      }
    printf("%d\n", mni);
    return 0;
  }
  fen(k);
  int TT = (cnt[0] + 1) * w[0] - 1;
  for (int i = 1, i_r = TT; i <= i_r; ++i) dp1[0][i] = N;
  for (int i = 1, i_r = n; i <= i_r; ++i) {
    f1 = dp1[i];
    g1 = dp2[i];
    f0 = dp1[i - 1];
    g0 = dp2[i - 1];
    get(a[i]);
    dfs(0, 0, 0);
  }
  if (dp1[n][TT] == N)
    puts("-1");
  else {
    printf("%d\n", dp1[n][TT]);
    vector<int> ans;
    int nw = TT;
    for (int i = n, i_l = 1; i >= i_l; --i) {
      get(a[i]);
      int tw = 0;
      for (int i = 0, i_r = tot - 1; i <= i_r; ++i)
        tw += (cnt[i] - ncnt[i]) * w[i];
      if (dp1[i][nw] == dp1[i - 1][tw] + 1 &&
          dp2[i][nw] == dp2[i - 1][tw] + nx) {
        ans.push_back(i);
        nw = tw;
        for (int i = 0, i_r = tot - 1; i <= i_r; ++i) cnt[i] -= ncnt[i];
      }
    }
    for (auto x : ans) printf("%d ", x);
  }
}