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;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename T>
using vec = vector<T>;
template <typename K, typename V>
using umap = unordered_map<K, V>;
template <typename K>
using uset = unordered_set<K>;
using vi = vec<int>;
using vl = vec<ll>;
using vpi = vec<pii>;
using vpl = vec<pll>;
using int128 = __int128_t;
using uint128 = __uint128_t;
template <typename I>
string intStr(I x) {
  string ret;
  while (x > 0) {
    ret += (x % 10) + '0';
    x /= 10;
  }
  reverse(ret.begin(), ret.end());
  return ret;
}
template <typename T>
inline void maxa(T& st, T v) {
  st = max(st, v);
}
template <typename T>
inline void mina(T& st, T v) {
  st = min(st, v);
}
inline void setprec(ostream& out, int prec) {
  out << setprecision(prec) << fixed;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> iter) {
  out << "[";
  for (auto t : iter) {
    out << t << ", ";
  }
  out << "]";
  return out;
}
template <typename T>
string arrayStr(T* arr, int sz) {
  string ret = "[";
  for (int i = 0; i < sz; i++) {
    ret += to_string(arr[i]) + ", ";
  }
  return ret + "]";
}
template <typename T>
void printArray(T* arr, int sz) {
  for (int i = 0; i < sz; i++) {
    cout << arr[i] << " ";
  }
  cout << "\n";
}
inline void scan() {}
template <typename F, typename... R>
inline void scan(F& f, R&... r) {
  cin >> f;
  scan(r...);
}
template <typename F>
inline void println(F t) {
  cout << t << '\n';
}
template <typename F, typename... R>
inline void println(F f, R... r) {
  cout << f << " ";
  println(r...);
}
inline void print() {}
template <typename F, typename... R>
inline void print(F f, R... r) {
  cout << f;
  print(r...);
}
vl factor(ll x) {
  ld sqx = sqrt(x) + 100;
  vl ret;
  for (__typeof(1) i = 1; i < sqx + 1; i++) {
    if (x % i == 0) {
      ret.push_back(i);
      ret.push_back(x / i);
    }
  }
  sort(ret.begin(), ret.end());
  ret.resize(unique(ret.begin(), ret.end()) - ret.begin());
  return ret;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
using pll = pair<ll, ll>;
const int MN = 1001, MF = 7001;
int n, par[MN][MF];
pll dp[MN][MF];
ll k;
struct p {
  int i;
  ll v, gv;
  bool operator<(const p& o) const { return v < o.v; }
} num[MN];
vl kfactors;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  scan(n, k);
  kfactors = factor(k);
  int fsz = kfactors.size();
  assert(fsz < MF);
  for (__typeof(1) i = 1; i < n + 1; i++) {
    scan(num[i].v);
    num[i].gv = gcd(num[i].v, k);
    num[i].i = i;
  }
  sort(num + 1, num + n + 1);
  if (k == 1) {
    println(1);
    println(num[1].i);
    return 0;
  }
  pll invalid = make_pair(0x3f3f3f3f3f3f3f3f, 0x3f3f3f3f3f3f3f3f);
  dp[0][0] = {0LL, 0LL};
  for (__typeof(1) i = 1; i < fsz; i++) dp[0][i] = invalid;
  for (__typeof(1) i = 1; i < n + 1; i++) {
    for (__typeof(1) j = 1; j < fsz; j++) {
      dp[i][j] = min(invalid, dp[i - 1][j]);
      par[i][j] = j;
      ll from = kfactors[j] / gcd(num[i].gv, kfactors[j]);
      int fromid = lower_bound((kfactors).begin(), (kfactors).end(), from) -
                   kfactors.begin();
      auto alt = dp[i - 1][fromid];
      alt.first++;
      alt.second += num[i].v;
      if (alt < dp[i][j]) {
        dp[i][j] = alt;
        par[i][j] = fromid;
      }
    }
  }
  if (dp[n][fsz - 1].first == 0x3f3f3f3f3f3f3f3f) {
    println(-1);
    return 0;
  }
  println(dp[n][fsz - 1].first);
  vi seq;
  int ci = n, cj = fsz - 1;
  while (ci > 0 && cj > 0) {
    auto cpar = par[ci][cj];
    if (cj > cpar) seq.push_back(num[ci].i);
    ci--;
    cj = cpar;
  }
  sort(seq.begin(), seq.end());
  for (auto x : seq) print(x, ' ');
  print('\n');
  return 0;
}