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 MAXN = 1e3 + 1, INF = 1e4, MAXDIVS = 7000, MAXP = 1e6 + 5;
map<long long, int> idx;
long long N, K, A[MAXN];
vector<long long> kprimes;
int cnt[MAXN][MAXDIVS], nxtpos;
long long sm[MAXN][MAXDIVS];
pair<int, int> nxt[MAXN][MAXDIVS];
bool check[MAXN][MAXDIVS], take[MAXN][MAXDIVS];
vector<long long> divs;
map<long long, int> jdkfjdk;
vector<int> primes;
bool isp[MAXP];
long long pots[15][50];
int Af[MAXN][15], divf[MAXDIVS][15];
long long pot(long long b, int e) { return pots[b][e]; }
long long gcd(int i, int j) {
  long long x = 1;
  for (int k = 0; k < (int)nxtpos; k++) {
    x *= pot(k, min(divf[i][k], Af[j][k]));
  }
  return x;
}
void tk(int i, long long k, int nxti, long long nxtk, long long newcnt,
        long long newsm) {
  cnt[i][k] = newcnt;
  sm[i][k] = newsm;
  nxt[i][k] = {nxti, nxtk};
}
int solve() {
  int kk, fk, fkk;
  long long smk, smkk;
  int dv = divs.size();
  for (int i = 0; i < (int)dv; i++) cnt[N][i] = INF;
  for (int i = 0; i < (int)N + 1; i++) cnt[i][0] = 0;
  for (int i = N - 1; i > (int)-1; i--)
    for (int k = 0; k < (int)dv; k++) {
      kk = idx[divs[k] / gcd(k, i)];
      fk = cnt[i + 1][k];
      fkk = cnt[i + 1][kk];
      smk = sm[i + 1][k];
      smkk = sm[i + 1][kk];
      if (fk < fkk + 1) {
        tk(i, k, i + 1, k, fk, smk);
      } else if (fk > fkk + 1) {
        tk(i, k, i + 1, kk, fkk + 1, smkk + A[i]);
        take[i][k] = true;
      } else {
        if (smk < smkk + A[i]) {
          tk(i, k, i + 1, k, fk, smk);
        } else {
          tk(i, k, i + 1, kk, fkk + 1, smkk + A[i]);
          take[i][k] = true;
        }
      }
    }
}
void ans(int i, int k) {
  if (i == N || k == 0) return;
  if (take[i][k]) printf("%d ", i + 1);
  int nxti = nxt[i][k].first;
  int nxtk = nxt[i][k].second;
  ans(nxti, nxtk);
}
void spk() { printf("1\n%ld\n", min_element(A, A + N) - A + 1); }
void calcdivs() {
  long long div = 1;
  long long sq = ceil(sqrt(K));
  while (div < sq) {
    if (K % div == 0) {
      divs.push_back(div);
      divs.push_back(K / div);
    }
    div++;
  }
  if (K % sq == 0) divs.push_back(sq);
  sort(divs.begin(), divs.end());
  for (int i = 0; i < (int)divs.size(); i++) idx[divs[i]] = i;
}
void factor(long long n, bool div, int pos) {
  int i = 0, cnt;
  long long p;
  long long m = n;
  while (i < primes.size() && primes[i] * primes[i] <= n) {
    p = primes[i];
    cnt = 0;
    while (n % p == 0) {
      cnt++;
      n /= p;
    }
    if (cnt > 0) {
      if (div) {
        divf[pos][jdkfjdk[p]] = cnt;
      } else if (jdkfjdk.find(p) != jdkfjdk.end()) {
        Af[pos][jdkfjdk[p]] = cnt;
      }
    }
    i++;
  }
  if (isp[n]) {
    if (div) {
      divf[pos][jdkfjdk[n]] = 1;
    } else if (jdkfjdk.find(n) != jdkfjdk.end()) {
      Af[pos][jdkfjdk[n]] = 1;
    }
  }
}
void spfactor() {
  int i = 0, cnt;
  long long p;
  long long Kc = K;
  nxtpos = 0;
  while (i < primes.size() && primes[i] * primes[i] <= Kc) {
    p = primes[i];
    cnt = 0;
    while (Kc % p == 0) {
      cnt++;
      Kc /= p;
    }
    if (cnt > 0) {
      jdkfjdk[p] = nxtpos++;
      kprimes.push_back(p);
    }
    i++;
  }
  if (isp[Kc]) {
    jdkfjdk[Kc] = nxtpos++;
    kprimes.push_back(Kc);
  }
}
void decomp() {
  memset(isp, true, sizeof(isp));
  isp[0] = isp[1] = false;
  for (int i = 2; i < (int)MAXP; i++)
    if (isp[i]) {
      primes.push_back(i);
      for (long long j = 1ll * i * i; j < MAXP; j += i) isp[j] = false;
    }
  spfactor();
  for (int i = 0; i < (int)divs.size(); i++) factor(divs[i], true, i);
  for (int i = 0; i < (int)N; i++) factor(A[i], false, i);
}
void calcpot() {
  for (int i = 0; i < (int)nxtpos; i++) {
    long long f = kprimes[i];
    pots[jdkfjdk[f]][0] = 1;
    for (int it = 1; it < (int)50; it++) {
      pots[jdkfjdk[f]][it] = pots[jdkfjdk[f]][it - 1] * f;
    }
  }
}
int main() {
  scanf("%lld", &N), scanf("%lld", &K);
  for (int i = 0; i < (int)N; i++) scanf("%lld", &A[i]);
  if (K == 1) {
    spk();
    return 0;
  }
  calcdivs();
  decomp();
  calcpot();
  solve();
  if (cnt[0][idx[K]] >= INF) {
    printf("-1\n");
  } else {
    printf("%d\n", cnt[0][idx[K]]);
    ans(0, idx[K]);
    printf("\n");
  }
}