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;
struct State {
  int val, prev;
  long long sum;
  State() {}
  State(int val, int prev, long long sum) {
    this->val = val;
    this->prev = prev;
    this->sum = sum;
  }
};
int N;
long long K;
vector<long long> factors;
long long val[1001];
State dp[1001][7000];
vector<pair<long long, int>> factor(long long X) {
  vector<pair<long long, int>> ret;
  for (long i = 2; i * i <= X; i++) {
    if (X % i == 0) {
      ret.push_back({i, 0});
      while (X % i == 0) {
        ret[ret.size() - 1].second++;
        X /= i;
      }
    }
  }
  if (X != 1) ret.push_back({X, 1});
  return ret;
}
void fillFactors(vector<pair<long long, int>> primes, int i, long long curr) {
  if (i == primes.size()) {
    factors.push_back(curr);
    return;
  }
  long long currPower = 1;
  for (int j = 0; j <= primes[i].second; j++) {
    fillFactors(primes, i + 1, curr * currPower);
    currPower *= primes[i].first;
  }
}
unordered_map<long long, int> toIndex;
int getFactorIndex(long long x) { return toIndex[x]; }
long long gcf(long long a, long long b) { return b ? gcf(b, a % b) : a; }
int main() {
  scanf("%d%lld", &N, &K);
  int minIndex = 1;
  for (int i = 1; i <= N; i++) {
    scanf("%lld", &val[i]);
    if (val[i] < val[minIndex]) minIndex = i;
  }
  if (K == 1) {
    printf("%d\n%d", 1, minIndex);
    return 0;
  }
  vector<pair<long long, int>> f = factor(K);
  fillFactors(f, 0, 1);
  sort(factors.begin(), factors.end());
  for (int i = 0; i < factors.size(); i++) toIndex[factors[i]] = i;
  int valPowers[N + 1][f.size()];
  int factorPowers[factors.size()][f.size()];
  vector<long long> powers[f.size()];
  for (int i = 0; i < f.size(); i++) {
    powers[i].push_back(1l);
    for (int j = 1; j <= f[i].second; j++)
      powers[i].push_back(powers[i][j - 1] * f[i].first);
  }
  for (int i = 1; i <= N; i++) {
    long long curr = val[i];
    for (int j = 0; j < f.size(); j++) {
      valPowers[i][j] = 0;
      while (curr % f[j].first == 0) {
        curr /= f[j].first;
        valPowers[i][j]++;
      }
    }
  }
  for (int i = 0; i < factors.size(); i++) {
    long long curr = factors[i];
    for (int j = 0; j < f.size(); j++) {
      factorPowers[i][j] = 0;
      while (curr % f[j].first == 0) {
        curr /= f[j].first;
        factorPowers[i][j]++;
      }
    }
  }
  for (int i = 0; i <= N; i++)
    for (int j = 0; j < factors.size(); j++)
      dp[i][j] = State(1l << 30, -1l, 1l << 30);
  dp[0][0] = State(0l, -1l, 0l);
  for (int i = 1; i <= N; i++) {
    for (int j = 0; j < factors.size(); j++) {
      dp[i][j] = State(dp[i - 1][j].val, j, dp[i - 1][j].sum);
      long long x = 1;
      for (int k = 0; k < f.size(); k++) {
        x *= powers[k][min(valPowers[i][k], factorPowers[j][k])];
      }
      long long nextFactor = factors[j] / x;
      int index = getFactorIndex(nextFactor);
      if ((dp[i - 1][index].val + 1 < dp[i][j].val) ||
          (dp[i - 1][index].val + 1 == dp[i][j].val &&
           dp[i - 1][index].sum + val[i] <= dp[i][j].sum)) {
        dp[i][j] = State(dp[i - 1][index].val + 1, index,
                         dp[i - 1][index].sum + val[i]);
      }
    }
  }
  int i = N;
  int j = factors.size() - 1;
  if (dp[i][j].val != 1 << 30) {
    printf("%d\n", dp[i][j].val);
    while (i != 0) {
      State curr = dp[i][j];
      State prev = dp[i - 1][curr.prev];
      if (curr.sum - prev.sum != 0) printf("%d ", i);
      i--;
      j = curr.prev;
    }
  } else {
    printf("-1\n");
  }
  return 0;
}