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;
long long gcd(long long a, long long b) {
  if (a > b) {
    return gcd(b, a);
  }
  if (!a || !b) {
    return a + b;
  }
  return gcd(b % a, a);
}
vector<long long> divs(long long x) {
  vector<long long> ans;
  for (long long i = 1; i * i <= x; ++i)
    if (x % i == 0) {
      ans.push_back(i);
      ans.push_back(x / i);
    }
  sort(ans.begin(), ans.end());
  ans.resize(unique(ans.begin(), ans.end()) - ans.begin());
  return ans;
}
int n;
long long k;
long long a[1234];
pair<long long, long long> dp[1234][7654];
pair<int, int> dplast[1234][7654];
vector<long long> ds;
map<long long, int> mapka;
vector<long long> primes;
vector<int> valk;
vector<vector<int>> powki;
int val(long long a, long long p) {
  int ans = 0;
  while (a % p == 0) {
    ++ans;
    a /= p;
  }
  return ans;
}
long long pow(int i, int k) { return powki[i][k]; }
long long mul(long long a, long long b) {
  if (a > 2000000000 && b > 2000000000) {
    long long ans = 1;
    for (int i = 0; i < primes.size(); ++i) {
      long long p = primes[i];
      ans *= pow(i, min(valk[i], val(a, p) + val(b, p)));
    }
    return ans;
  } else {
    return gcd(a * b, k);
  }
}
void budka() {
  long long kk = k;
  for (long long i = 2; i * i <= kk; ++i) {
    if (kk % i == 0) {
      primes.push_back(i);
      int vlll = 0;
      while (kk % i == 0) {
        kk /= i;
        ++vlll;
      }
      valk.push_back(vlll);
    }
  }
  if (kk > 1) {
    primes.push_back(kk);
    valk.push_back(1);
  }
  powki.resize(primes.size());
  for (int i = 0; i < primes.size(); ++i) {
    long long vv = 1;
    for (int j = 0; j <= valk[i]; ++j) {
      powki[i].push_back(vv);
      vv *= primes[i];
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  if (k == 1) {
    int mini = 1;
    for (int i = 2; i <= n; ++i)
      if (a[mini] > a[i]) {
        mini = i;
      }
    cout << 1 << endl << mini << endl;
    return 0;
  }
  budka();
  ds = divs(k);
  for (int i = 0; i < ds.size(); ++i) {
    mapka[ds[i]] = i;
  }
  for (int i = 0; i <= n; ++i)
    for (int j = 0; j < ds.size(); ++j) {
      dp[i][j] = make_pair(1234, 0);
    }
  dp[0][0] = make_pair(0, 0);
  for (int i = 0; i < n; ++i) {
    int tmp = gcd(a[i + 1], k);
    for (int j = 0; j < ds.size(); ++j) {
      long long newD = mul(tmp, ds[j]);
      int indD = mapka[newD];
      auto tmp = make_pair(dp[i][j].first + 1, dp[i][j].second + a[i + 1]);
      if (dp[i + 1][indD] > tmp) {
        dp[i + 1][indD] = tmp;
        dplast[i + 1][indD] = make_pair(i, j);
      }
      if (dp[i + 1][j] > dp[i][j]) {
        dp[i + 1][j] = dp[i][j];
        dplast[i + 1][j] = make_pair(i, j);
      }
    }
  }
  if (dp[n][ds.size() - 1].first == 1234) {
    cout << -1 << endl;
    return 0;
  }
  cout << dp[n][ds.size() - 1].first << endl;
  int ind1 = n;
  int ind2 = ds.size() - 1;
  for (int i = 0; i < dp[n][ds.size() - 1].first; ++i) {
    while (dplast[ind1][ind2] == make_pair(ind1 - 1, ind2)) {
      --ind1;
    }
    cout << ind1 << " ";
    auto tmp = dplast[ind1][ind2];
    ind1 = tmp.first;
    ind2 = tmp.second;
  }
  cout << endl;
}