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;
inline bool SR(int &x) { return scanf("%d", &x) == 1; }
inline bool SR(long long &x) { return scanf("%lld", &x) == 1; }
inline bool SR(double &x) { return scanf("%lf", &x) == 1; }
inline bool SR(char *s) { return scanf("%s", s) == 1; }
inline bool RI() { return true; }
template <typename I, typename... T>
inline bool RI(I &x, T &...tail) {
  return SR(x) && RI(tail...);
}
inline void SP(const int x) { printf("%d", x); }
inline void SP(const long long x) { printf("%lld", x); }
inline void SP(const double x) { printf("%.16lf", x); }
inline void SP(const char *s) { printf("%s", s); }
inline void PL() { puts(""); }
template <typename I, typename... T>
inline void PL(const I x, const T... tail) {
  SP(x);
  if (sizeof...(tail)) putchar(' ');
  PL(tail...);
}
template <typename I>
void _DOING(const char *s, I &&x) {
  cerr << s << " = " << x << endl;
}
template <typename I, typename... T>
void _DOING(const char *s, I &&x, T &&...tail) {
  int c = 0;
  while (*s != ',' || c != 0) {
    if (*s == '(' || *s == '[' || *s == '{') c++;
    if (*s == ')' || *s == ']' || *s == '}') c--;
    cerr << *s++;
  }
  cerr << " = " << x << " , ";
  _DOING(s + 1, tail...);
}
inline int RAND() {
  static int x = 880301;
  return (x = x * 0xdefaced + 1) & 0x7fffffff;
}
const int INF = 0x3f3f3f3f;
const int MAX_N = 1000 + 10;
long long a[MAX_N];
vector<long long> factor;
unordered_map<long long, int> table;
pair<int, long long> dp[MAX_N][10000];
pair<int, int> path[MAX_N][10000];
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  long long k;
  RI(n, k);
  for (int i = 1; i <= int(n); i++) RI(a[i]);
  if (k == 1LL) {
    PL(1);
    int ans = 1;
    for (int i = 1; i <= int(n); i++) {
      if (a[ans] > a[i]) ans = i;
    }
    PL(ans);
  } else {
    for (long long i = 1; i * i <= k; i++) {
      if (k % i) continue;
      long long j = k / i;
      factor.push_back(i);
      if (j != i) factor.push_back(j);
    }
    sort((factor).begin(), (factor).end());
    for (int i = 0; i < int(((int)factor.size())); i++) table[factor[i]] = i;
    for (int i = 0; i <= int(n); i++) {
      for (int j = 0; j < int(((int)factor.size())); j++) {
        dp[i][j] = make_pair(INF, 0);
        path[i][j] = make_pair(0, 0);
      }
    }
    dp[0][0] = make_pair(0, 0);
    for (int i = 1; i <= int(n); i++) {
      if (gcd(k, a[i]) == 1) {
        for (int j = 0; j < int(((int)factor.size())); j++) {
          dp[i][j] = dp[i - 1][j];
          path[i][j] = make_pair(i - 1, j);
        }
        continue;
      }
      for (int j = 0; j < int(((int)factor.size())); j++) {
        if (dp[i][j] > dp[i - 1][j]) {
          dp[i][j] = dp[i - 1][j];
          path[i][j] = make_pair(i - 1, j);
        }
        long long t = factor[j] / gcd(a[i], factor[j]);
        int p = table[t];
        pair<int, long long> st =
            make_pair(dp[i - 1][p].first + 1, dp[i - 1][p].second + a[i]);
        if (dp[i][j] > st) {
          dp[i][j] = st;
          path[i][j] = make_pair(i - 1, p);
        }
      }
    }
    if (dp[n][((int)factor.size()) - 1].first == INF)
      PL(-1);
    else {
      PL(dp[n][((int)factor.size()) - 1].first);
      pair<int, int> p(n, ((int)factor.size()) - 1);
      while (p.first && p.second) {
        if (path[p.first][p.second].second != p.second) PL(p.first);
        p = path[p.first][p.second];
      }
    }
  }
  return 0;
}