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 long long N = 100005;
const long long mod = 1000000007;
long long bp(long long x, long long y) {
  long long ans = 1;
  x %= mod;
  while (y) {
    if (y & 1) ans = ans * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long mod_inverse(long long x) { return bp(x, mod - 2); }
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long max(long long a, long long b) {
  if (a < b) swap(a, b);
  return a;
}
long long min(long long a, long long b) {
  if (a > b) swap(a, b);
  return a;
}
long long countSetBits(long long n) {
  long long count = 0;
  while (n) {
    count += n & 1;
    n >>= 1;
  }
  return count;
}
pair<long long, long long> dp[1010][10010];
long long fact[10010], cnt = 0;
void solve() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, k;
  cin >> n >> k;
  long long a[n + 1], b[n + 1], rem = k, mn = 1e18 + 1e9, mn_idx;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = gcd(a[i], k);
    rem /= gcd(rem, a[i]);
    if (mn > a[i]) mn = a[i], mn_idx = i;
  }
  if (rem > 1) {
    cout << "-1";
    return;
  }
  if (k == 1) {
    cout << "1" << '\n' << mn_idx;
    return;
  }
  for (long long i = 1; i * i <= k; i++) {
    if (k % i) continue;
    fact[cnt++] = i;
    if (i != k / i) fact[cnt++] = k / i;
  }
  sort(fact, fact + cnt);
  map<long long, long long> mp;
  for (long long i = 0; i < cnt; i++) mp[fact[i]] = i;
  for (long long i = 1; i < cnt; i++) dp[0][i] = {n + 1, 0};
  dp[0][0] = {0, 0};
  for (long long i = 1; i <= n; i++) {
    for (long long j = 0; j < cnt; j++) {
      dp[i][j] = dp[i - 1][j];
      long long t = mp[fact[j] / gcd(fact[j], b[i])];
      if (dp[i][j] >
          make_pair(dp[i - 1][t].first + 1, dp[i - 1][t].second + a[i]))
        dp[i][j] = {dp[i - 1][t].first + 1, dp[i - 1][t].second + a[i]};
    }
  }
  cout << dp[n][cnt - 1].first << '\n';
  rem = k;
  for (long long i = n; i > 0; i--) {
    if (dp[i][mp[rem]] == dp[i - 1][mp[rem]]) continue;
    cout << i << " ";
    rem /= gcd(rem, b[i]);
  }
}
signed main() { solve(); }