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, M, P;
long long K;
pair<int, long long> dp[1005][7005];
int par[1005][7005];
long long arr[1005];
long long brr[1005];
vector<long long> f;
vector<pair<long long, int>> lim;
vector<int> v[7005];
vector<long long> qikpow[50];
vector<int> ans;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> K;
  for (int i = 1; i <= N; i++) {
    cin >> arr[i];
  }
  if (K == 1) {
    int mini = 1;
    for (int i = 2; i <= N; i++) {
      if (arr[mini] > arr[i]) {
        mini = i;
      }
    }
    cout << 1 << endl;
    cout << mini << endl;
    return 0;
  }
  for (long long i = 1; i * i <= K; i++) {
    if (K % i == 0) {
      f.push_back(i);
      if (K / i != i) {
        f.push_back(K / i);
      }
    }
  }
  sort(f.begin(), f.end());
  for (int i = 1; i <= N; i++) {
    for (long long k : f) {
      if (arr[i] % k == 0) {
        brr[i] = k;
      }
    }
  }
  M = f.size();
  for (int i = 0; i <= N; i++) {
    for (int j = 0; j <= M; j++) {
      dp[i][j] = {N + 1, LLONG_MAX >> 2};
      par[i][j] = -1;
    }
  }
  long long t = K;
  for (long long k : f) {
    if (k - 1 && t % k == 0) {
      int cnt = 0;
      while (t % k == 0) {
        t /= k;
        cnt++;
      }
      lim.push_back({k, cnt});
    }
  }
  P = lim.size();
  for (int p = 0; p < P; p++) {
    qikpow[p].push_back(1);
    for (int k = 1; k <= lim[p].second; k++) {
      qikpow[p].push_back(qikpow[p].back() * lim[p].first);
    }
  }
  for (int j = 0; j < M; j++) {
    for (int p = 0; p < P; p++) {
      for (int k = lim[p].second; k >= 0; k--) {
        if (f[j] % qikpow[p][k] == 0) {
          v[j].push_back(k);
          break;
        }
      }
    }
  }
  dp[0][0] = {0, 0};
  for (int i = 1; i <= N; i++) {
    int t = lower_bound(f.begin(), f.end(), 1LL * brr[i]) - f.begin();
    for (int j = 0; j < M; j++) {
      long long s = 1;
      for (int p = 0; p < P; p++) {
        s *= qikpow[p][min(lim[p].second, v[t][p] + v[j][p])];
      }
      int idx = lower_bound(f.begin(), f.end(), s) - f.begin();
      if ((dp[i - 1][j].first + 1 < dp[i][idx].first) ||
          (dp[i - 1][j].first + 1 == dp[i][idx].first &&
           dp[i - 1][j].second + arr[i] < dp[i][idx].second)) {
        dp[i][idx].first = dp[i - 1][j].first + 1;
        dp[i][idx].second = dp[i - 1][j].second + arr[i];
        par[i][idx] = j;
      }
      if ((dp[i - 1][j].first < dp[i][j].first) ||
          (dp[i - 1][j].first == dp[i][j].first &&
           dp[i - 1][j].second < dp[i][j].second)) {
        dp[i][j].first = dp[i - 1][j].first;
        dp[i][j].second = dp[i - 1][j].second;
        par[i][j] = -1;
      }
    }
  }
  if (dp[N][M - 1].second == LLONG_MAX >> 2) {
    cout << -1 << endl;
    return 0;
  }
  int crnt = M - 1;
  for (int n = N; n; n--) {
    if (par[n][crnt] + 1) {
      ans.push_back(n);
      crnt = par[n][crnt];
    }
  }
  cout << ans.size() << "\n";
  for (int n : ans) {
    cout << n << " ";
  }
}