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 Item {
  int length;
  long long sum;
};
const bool operator<(const Item &v1, const Item &v2) {
  return v1.length < v2.length || ((v1.length == v2.length) && v1.sum < v2.sum);
}
const bool operator==(const Item &v1, const Item &v2) {
  return !(v1 < v2) && !(v2 < v1);
}
const bool operator>(const Item &v1, const Item &v2) { return v2 < v1; }
void re() { vector<int> b(1e10); }
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
const int N = 3e4;
const int L = 1002;
unordered_map<long long, int> dict;
long long invdict[N];
Item knapsack[2][N];
int dp[L][N];
Item INF = {1002, -1};
int sz = 1;
vector<pair<long long, long long> > prime;
long long big_gcd(long long k, long long a, long long b) {
  long long mul = a * b;
  if (mul / a == b) return gcd(k, a * b);
  long long res = 1;
  for (pair<long long, long long> p : prime) {
    while (a % p.first == 0 && p.second) {
      res *= p.first;
      --p.second;
      a /= p.first;
    }
    while (b % p.first == 0 && p.second) {
      res *= p.first;
      --p.second;
      b /= p.first;
    }
    if (a == 1 && b == 1) break;
  }
  return res;
}
void prec(long long k) {
  for (long long i = 2; i * i <= k; ++i) {
    int cnt = 0;
    while (k % i == 0) {
      ++cnt;
      k /= i;
    }
    prime.push_back(make_pair(i, cnt));
  }
  if (k != 1) prime.push_back(make_pair(k, 1));
  sort(prime.begin(), prime.end());
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  set<long long> divisors;
  int n;
  long long k;
  cin >> n >> k;
  prec(k);
  divisors.insert(1);
  divisors.insert(k);
  for (int i = 0; i < L; ++i) fill(dp[i], dp[i] + N, -1);
  for (long long i = 2; i * i <= k; ++i)
    if (k % i == 0) {
      divisors.insert(i);
      divisors.insert(k / i);
    }
  if (divisors.size() >= N) re();
  int cnt = 0;
  for (long long divisor : divisors) {
    invdict[cnt] = divisor;
    dict[divisor] = cnt++;
  }
  for (int z : {0, 1}) fill(knapsack[z], knapsack[z] + N, INF);
  int p = 0;
  int c = 1;
  knapsack[p][0] = {0, 0};
  int ind = 0;
  long long mn = -1;
  for (int i = 0; i < n; ++i, swap(p, c)) {
    long long cur;
    cin >> cur;
    if (!i) mn = cur;
    if (mn > cur) {
      mn = cur;
      ind = i;
    }
    for (int j = 0; j < sz; ++j) knapsack[c][j] = knapsack[p][j];
    long long g = gcd(cur, k);
    int nsz = sz;
    for (int j = 0; j < sz; ++j) {
      if (knapsack[p][j] == INF) continue;
      long long val = big_gcd(k, g, invdict[j]);
      int nx = dict[val];
      nsz = max(nsz, nx + 1);
      knapsack[p][j];
      Item prop = knapsack[p][j];
      ++prop.length;
      prop.sum += cur;
      if (knapsack[c][nx] > prop) {
        knapsack[c][nx] = prop;
        dp[i][nx] = j;
      }
    }
    sz = nsz;
  }
  if (k == 1) {
    cout << "1\n";
    cout << ind + 1;
    return 0;
  }
  if (knapsack[p][cnt - 1] == INF) {
    cout << "-1";
    return 0;
  }
  cout << knapsack[p][cnt - 1].length << "\n";
  int cur = cnt - 1;
  vector<int> ans;
  for (int i = n - 1; i >= 0; --i) {
    if (dp[i][cur] != -1) {
      ans.push_back(i);
      cur = dp[i][cur];
    }
  }
  if (ans.size() != knapsack[p][cnt - 1].length) re();
  for (int i = ans.size() - 1; i >= 0; --i) cout << ans[i] + 1 << " ";
}