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;
const long long UNDEF = -1;
template <typename T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, true : false;
}
template <typename T>
inline bool chkmin(T &a, T b) {
  return a > b ? a = b, true : false;
}
const long long INF = 3e18;
const long long MAXL = 8000 + 4;
const long long MAXN = 1000 + 4;
long long a[MAXN];
pair<long long, long long> g[MAXN][MAXL];
int h[MAXN][MAXL];
vector<long long> dv;
long long dvsz;
long long trans[MAXN][MAXL];
long long getdi(long long x) {
  long long imin = 0, imax = dvsz;
  while (imin < imax) {
    long long imid = (imin + imax) / 2;
    if (dv[imid] < x)
      imin = imid + 1;
    else
      imax = imid;
  }
  return imin;
}
long long hasd[MAXL];
int main() {
  long long n, k;
  scanf("%I64d %I64d", &n, &k);
  for (long long i = 0; i < n; i++) {
    scanf("%I64d", &a[i]);
  }
  if (k == 1) {
    pair<long long, long long> ans = make_pair(a[0], 0LL);
    for (long long i = 1; i < n; i++) {
      chkmin(ans, make_pair(a[i], i));
    }
    printf("1\n%I64d\n", ans.second + 1);
    return 0;
  }
  set<long long> s;
  long long dlim = sqrt(k) + 1;
  for (long long d = 1; d <= dlim; d++) {
    if (0 == k % d) {
      s.insert(d);
      s.insert(k / d);
    }
  }
  for (auto &w : s) {
    dv.push_back(w);
  }
  dvsz = dv.size();
  for (long long x = 1; x < dvsz; x++) hasd[x] = UNDEF;
  vector<long long> pv;
  for (long long x = 1; x < dvsz; x++) {
    if (hasd[x] != UNDEF) continue;
    pv.push_back(x);
    long long v = dv[x];
    for (long long y = x + 1; y < dvsz; y++) {
      if (hasd[y] != UNDEF) continue;
      long long w = dv[y];
      if (w % v == 0) {
        hasd[y] = x;
      }
    }
  }
  long long pvsz = pv.size();
  for (long long x = 0; x < n; x++) {
    for (long long l = 0; l < dvsz; l++) {
      trans[x][l] = 1;
    }
  }
  for (long long l = 1; l < dvsz; l++) {
    long long hd = hasd[l];
    if (hd == UNDEF) hd = l;
    long long p = dv[hd];
    long long tmpl = dv[l];
    long long r = getdi(tmpl / p);
    long long pe = 1;
    while (tmpl % p == 0) {
      tmpl /= p;
      pe *= p;
    }
    for (long long x = 0; x < n; x++) {
      long long got = trans[x][r];
      if (a[x] % pe == 0) {
        trans[x][l] = got * p;
      } else {
        trans[x][l] = got;
      }
    }
  }
  for (long long x = 0; x < n; x++)
    for (long long l = 0; l < dvsz; l++) {
      trans[x][l] = getdi(dv[l] / trans[x][l]);
    }
  for (long long y = 0; y < dvsz; y++) g[n][y] = make_pair(INF, INF);
  g[n][0] = make_pair(0LL, 0LL);
  for (long long x = n - 1; x >= 0; x--)
    for (long long y = 0; y < dvsz; y++) {
      pair<long long, long long> av = g[x + 1][y];
      long long ny = trans[x][y];
      pair<long long, long long> bv = g[x + 1][ny];
      bv.first++;
      bv.second += a[x];
      if (av < bv) {
        g[x][y] = av;
        h[x][y] = y;
      } else {
        g[x][y] = bv;
        h[x][y] = ny;
      }
    }
  vector<long long> ans;
  {
    long long x = 0, y = dvsz - 1;
    if (g[x][y].first == INF) {
      printf("-1\n");
      return 0;
    }
    while (1) {
      if (x == n && y == 0) break;
      long long ny = h[x][y];
      if (ny != y) {
        ans.push_back(x);
      }
      y = ny;
      x++;
    }
  }
  long long asz = ans.size();
  printf("%I64d\n", asz);
  for (auto &w : ans) {
    printf("%I64d ", w + 1);
  }
  printf("\n");
}