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 int oo = 0x3f3f3f3f;
int n, l, mxv, cd[1005][59], mv[1005][12005];
long long a[1005];
pair<int, int> dv[59];
pair<int, long long> pd[1005][12005];
bool mark[1005][12005], take[1005][12005];
inline void decomp(long long v, int *pt) {
  for (int(i) = (0); (i) < (l); ++(i)) {
    int q = dv[i].second + 1;
    pt[i] = v % q;
    v /= q;
  }
}
inline long long recomp(int *pt) {
  long long v = 0;
  for (int(ii) = (0); (ii) < (l); ++(ii)) {
    int i = l - ii - 1;
    int q = dv[i].second + 1;
    v *= q;
    v += pt[i];
  }
  return v;
}
int move(int u, int v) {
  int pt[59];
  decomp(v, pt);
  for (int(i) = (0); (i) < (l); ++(i)) pt[i] = max(0, pt[i] - cd[u][i]);
  return recomp(pt);
}
pair<int, long long> proc(int u, int v) {
  if (v == 0) return pair<int, long long>(0, 0);
  if (u == n) return pair<int, long long>(oo, 0);
  pair<int, long long> &ans = pd[u][v];
  if (mark[u][v]) return ans;
  mark[u][v] = 1;
  ans = proc(u + 1, v);
  take[u][v] = 0;
  int vv = v;
  v = mv[u][v];
  pair<int, long long> opt = proc(u + 1, v);
  opt.first++;
  opt.second += a[u];
  if (opt < ans) {
    ans = opt;
    take[u][vv] = 1;
  }
  return ans;
}
void fact(long long k) {
  l = 0;
  for (int i = 2; i * i <= k; i++)
    if (k % i == 0) {
      int q = 0;
      while (k % i == 0) {
        q++;
        k /= i;
      }
      dv[l++] = pair<int, int>(i, q);
    }
  if (k > 1) dv[l++] = pair<int, int>(k, 1);
  mxv = 1;
  for (int(i) = (0); (i) < (l); ++(i)) {
    mxv *= dv[i].second + 1;
  }
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
void prep(long long v, int *cd) {
  memset(cd, 0, 59 * sizeof(int));
  for (int(j) = (0); (j) < (l); ++(j)) {
    long long p = dv[j].first;
    while (v % p == 0) {
      v /= p;
      cd[j]++;
    }
  }
}
void go(int u, int i, int v1, int v2) {
  if (i == l) {
    mv[u][v1] = v2;
    return;
  }
  int q = dv[i].second + 1;
  v1 *= q;
  v2 *= q;
  for (int(j) = (0); (j) < (q); ++(j))
    go(u, i + 1, v1 + j, v2 + max(0, j - cd[u][i]));
}
int main() {
  long long k;
  while (scanf("%d", &n) == 1) {
    scanf("%lld", &k);
    for (int(i) = (0); (i) < (n); ++(i)) scanf("%lld", a + i);
    if (k == 1) {
      printf("%d\n", 1);
      printf("%d\n", 1 + int(min_element(a, a + n) - a));
      continue;
    }
    fact(k);
    for (int(i) = (0); (i) < (n); ++(i)) {
      prep(gcd(a[i], k), cd[i]);
      go(i, 0, 0, 0);
    }
    for (int(i) = (0); (i) < (n); ++(i))
      memset(mark[i], 0, (mxv + 1) * sizeof(bool));
    pair<int, long long> ans = proc(0, mxv - 1);
    if (ans.first == oo)
      puts("-1");
    else {
      printf("%d\n", ans.first);
      int v = mxv - 1;
      bool fp = 1;
      for (int(i) = (0); (i) < (n); ++(i))
        if (take[i][v]) {
          if (!fp) printf(" ");
          fp = 0;
          printf("%d", i + 1);
          v = mv[i][v];
        }
      puts("");
    }
  }
  return 0;
}