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;
int n;
long long int gc(long long int a, long long int b) {
  if (a > b) {
    swap(a, b);
  }
  while (a) {
    swap(a, b);
    a %= b;
  }
  return b;
}
bool use[1000002];
vector<long long int> pr;
long long int k;
long long int a[1000002];
long long int aa[1000002];
int im[22];
vector<pair<long long int, int> > v;
int star[20];
int tmp[20];
int tmp2[20];
long long int hash1() {
  int siz = v.size();
  long long int r = 0;
  for (int i = 0; i < siz; i++) {
    r += (tmp2[i]) * im[i + 1];
  }
  return r;
}
long long int hash2() {
  int siz = v.size();
  long long int r = 0;
  for (int i = 0; i < siz; i++) {
    r += (tmp[i]) * im[i + 1];
  }
  return r;
}
int V;
pair<int, long long int> dp[1002][10002];
int prr[1002][10002];
int DON[1002][10002];
long long int H = 0;
int id;
inline void dfs(int pos = 0) {
  if (pos == V) {
    int vv = hash2();
    int vvv = hash1();
    pair<int, long long int> nex = dp[id][vvv];
    if (nex.first == INT_MAX) return;
    nex.first++;
    nex.second += aa[id];
    if (dp[id + 1][vv] > nex) {
      dp[id + 1][vv] = nex;
      prr[id + 1][vv] = vvv;
      DON[id + 1][vv] = id;
    }
    if (dp[id + 1][vvv] > dp[id][vvv]) {
      dp[id + 1][vvv] = dp[id][vvv];
      prr[id + 1][vvv] = vvv;
      DON[id + 1][vvv] = DON[id][vvv];
    }
  } else {
    for (int j = v[pos].second; j >= 0; j--) {
      tmp2[pos] = j;
      tmp[pos] = min(v[pos].second, j + star[pos]);
      dfs(pos + 1);
    }
  }
}
vector<long long int> ans;
int main() {
  for (int i = 2; i < 1000002; i++) {
    if (use[i] == false) {
      pr.emplace_back(i);
      use[i] = true;
      for (int j = i * 2; j < 1000002; j += i) {
        use[j] = true;
      }
    }
  }
  scanf("%d%I64d", &n, &k);
  long long int tk = k;
  for (int i = 0; i < pr.size(); i++) {
    if (tk % pr[i] == 0) {
      int cnt = 0;
      while (tk % pr[i] == 0) {
        tk /= pr[i];
        cnt++;
      }
      v.push_back(make_pair(pr[i], cnt));
    }
  }
  if (tk > 1LL) {
    v.push_back(make_pair(tk, 1));
  }
  im[v.size()] = 1;
  for (int i = v.size() - 1; i >= 0; i--) {
    im[i] = im[i + 1] * (v[i].second + 1);
  }
  V = v.size();
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  for (int i = 0; i < n; i++) {
    aa[i] = a[i];
    a[i] = gc(a[i], k);
  }
  if (k == 1LL) {
    puts("1");
    long long int mint = LLONG_MAX;
    int id = -1;
    for (int i = 0; i < n; i++) {
      if (mint > aa[i]) {
        mint = aa[i];
        id = i;
      }
    }
    printf("%d\n", id + 1);
    return 0;
  }
  for (int i = 0; i < 10002; i++) {
    for (int j = 0; j <= n; j++) {
      dp[j][i].first = INT_MAX;
    }
  }
  memset(prr, -1, sizeof(prr));
  dp[0][0].first = dp[0][0].second = 0;
  for (int i = 0; i < n; i++) {
    bool add = false;
    for (int j = 0; j < v.size(); j++) {
      int cnt = 0;
      while (a[i] % v[j].first == 0) {
        cnt++;
        add = true;
        a[i] /= v[j].first;
      }
      star[j] = cnt;
    }
    dfs();
    id++;
  }
  for (int j = 0; j < v.size(); j++) {
    tmp[j] = v[j].second;
  }
  int h = hash2();
  int idd;
  pair<int, long long int> sum = {INT_MAX, LLONG_MAX};
  for (int j = 0; j <= n; j++) {
    if (sum > dp[j][h]) {
      idd = j;
      sum = dp[j][h];
    }
  }
  if (sum.first == INT_MAX) {
    puts("-1");
  } else {
    printf("%d\n", sum.first);
    int f = h;
    while (f != 0) {
      ans.push_back(DON[idd][f] + 1);
      f = prr[idd][f];
      idd--;
    }
    sort(ans.begin(), ans.end());
    ans.erase(unique(ans.begin(), ans.end()), ans.end());
    for (int i = 0; i < ans.size(); i++) {
      if (i) {
        printf(" ");
      }
      printf("%lld", ans[i]);
    }
  }
  return 0;
}