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 <class X, class Y>
void minimize(X &x, const Y &y) {
  if (x > y) x = y;
}
template <class X, class Y>
void maximize(X &x, const Y &y) {
  if (x < y) x = y;
}
template <class T>
T Abs(const T &x) {
  return (x < 0 ? -x : x);
}
long long a[1111], k;
int n, numDiv, numFact;
vector<pair<long long, int> > facts;
vector<pair<int, long long> > f[1111];
vector<int> trc[1111];
vector<int> gain[1111];
vector<int> divInfo[14];
void init(void) {
  cin >> n >> k;
  for (int i = (1), _b = (n); i <= _b; i = i + 1) cin >> a[i];
  if (k == 1) {
    int idMin = 1;
    for (int i = (1), _b = (n); i <= _b; i = i + 1)
      if (a[i] < a[idMin]) idMin = i;
    printf("1\n%d\n", idMin);
    exit(0);
  }
}
vector<int> getGain(long long x) {
  vector<int> res;
  for (__typeof((facts).begin()) it = (facts).begin(); it != (facts).end();
       it++) {
    res.push_back(0);
    while (x % it->first == 0) {
      res.back()++;
      x /= it->first;
    }
  }
  return (res);
}
void prepare(void) {
  for (int i = 2; 1LL * i * i <= k; i = i + 1)
    if (k % i == 0) {
      facts.push_back(make_pair(i, 0));
      while (k % i == 0) {
        k /= i;
        facts.back().second++;
      }
    }
  if (k > 1) facts.push_back(make_pair(k, 1));
  numFact = facts.size();
  assert(numFact < 14);
  numDiv = 1;
  for (__typeof((facts).begin()) it = (facts).begin(); it != (facts).end();
       it++)
    numDiv *= it->second + 1;
  for (int i = 0, _n = (numFact); i < _n; i = i + 1)
    divInfo[i].assign(numDiv, 0);
  for (int i = 0, _n = (numDiv); i < _n; i = i + 1) {
    int code = i;
    for (int j = (numFact - 1), _a = (0); j >= _a; j = j - 1) {
      divInfo[j][i] = code % (facts[j].second + 1);
      code /= facts[j].second + 1;
    }
  }
  for (int i = (1), _b = (n); i <= _b; i = i + 1) gain[i] = getGain(a[i]);
}
int getNewDiv(int curDiv, const vector<int> &gain) {
  int code = 0;
  for (int i = 0, _n = (numFact); i < _n; i = i + 1) {
    int newDiv = min(divInfo[i][curDiv] + gain[i], facts[i].second);
    code = code * (facts[i].second + 1) + newDiv;
  }
  return (code);
}
void optimize(void) {
  for (int i = 0, _n = (n + 1); i < _n; i = i + 1)
    f[i].assign(numDiv, make_pair(n + 1, n + 1));
  for (int i = 0, _n = (n + 1); i < _n; i = i + 1) trc[i].assign(numDiv, -1);
  f[0][0] = make_pair(0, 0);
  for (int i = 0, _n = (n); i < _n; i = i + 1)
    for (int j = 0, _n = (numDiv); j < _n; j = j + 1)
      if (f[i][j].first <= n) {
        if (f[i + 1][j] > f[i][j]) {
          f[i + 1][j] = f[i][j];
          trc[i + 1][j] = -1;
        }
        int newDiv = getNewDiv(j, gain[i + 1]);
        pair<int, long long> newVal(f[i][j].first + 1,
                                    f[i][j].second + a[i + 1]);
        if (f[i + 1][newDiv] > newVal) {
          f[i + 1][newDiv] = newVal;
          trc[i + 1][newDiv] = j;
        }
      }
}
void trace(void) {
  if (f[n][numDiv - 1].first > n) {
    printf("-1\n");
    return;
  }
  vector<int> res;
  int j = numDiv - 1;
  for (int i = (n), _a = (1); i >= _a; i = i - 1) {
    if (f[i - 1][j] == f[i][j]) continue;
    res.push_back(i);
    j = trc[i][j];
  }
  printf("%d\n", (int)res.size());
  for (__typeof((res).begin()) it = (res).begin(); it != (res).end(); it++)
    printf("%d ", *it);
  printf("\n");
}
int main(void) {
  init();
  prepare();
  optimize();
  trace();
  return 0;
}