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;
template <typename T>
T gcd(T first, T second) {
  while (second > 0) {
    first %= second;
    swap(first, second);
  }
  return first;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class _T>
inline _T sqr(const _T &first) {
  return first * first;
}
template <class _T>
inline string tostr(const _T &a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795L;
template <typename T>
inline void input(T &a) {
  static int ed;
  a = 0;
  while (!isdigit(ed = getchar()) && ed != '-') {
  }
  char neg = 0;
  if (ed == '-') {
    neg = 1;
    ed = getchar();
  }
  while (isdigit(ed)) {
    a = 10 * a + ed - '0';
    ed = getchar();
  }
  if (neg) a = -a;
}
template <typename T = int>
inline T nxt() {
  T res;
  input(res);
  return res;
}
void myassert(bool v) { assert(v); }
mt19937 generator;
bool check(int v) {
  if (v < 2) return false;
  for (int i = 2; i * i <= v; ++i) {
    if (v % i == 0) {
      return false;
    }
  }
  return true;
}
long long pw(long long a, long long n, long long m) {
  long long res = 1;
  while (n) {
    if (n & 1ll) {
      res = res * a % m;
    }
    a = a * a % m;
    n >>= 1;
  }
  return res;
}
long long inv(long long a, long long p) {
  long long res = 1;
  while (a > 1) {
    res = res * (p - p / a) % p;
    a = p % a;
  }
  return res;
}
template <class T>
bool uin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
struct data {
  int cnt;
  long long sum;
  data() {
    cnt = INT_MAX / 2;
    sum = 0;
  }
  data(int c, long long s) {
    cnt = c;
    sum = s;
  }
  data operator+(const long long &first) const {
    return data(cnt + 1, sum + first);
  }
  bool operator<(const data &r) const {
    if (cnt != r.cnt) {
      return cnt < r.cnt;
    }
    return sum < r.sum;
  }
};
data dp[1001][6800];
pair<int, int> pp[1001][6800];
void solve(int test) {
  int n = nxt();
  long long k = nxt<long long>();
  vector<long long> a(n);
  vector<long long> b(n);
  for (int i = 0; i < (int)(n); ++i) {
    a[i] = nxt<long long>();
    b[i] = gcd(a[i], k);
  }
  if (k == 1) {
    cout << "1\n";
    cout << min_element((a).begin(), (a).end()) - a.begin() + 1 << "\n";
    return;
  }
  vector<long long> divs;
  for (long long i = 1; i * i <= k; ++i) {
    if (k % i == 0) {
      divs.push_back(i);
      if (i * i != k) divs.push_back(k / i);
    }
  }
  sort((divs).begin(), (divs).end());
  cerr << divs.size() << endl;
  unordered_map<long long, int> ppp;
  for (int i = 0; i < divs.size(); ++i) {
    ppp[divs[i]] = i;
  }
  dp[0][0] = data{0, 0};
  cerr << clock() / 1.0 / CLOCKS_PER_SEC << endl;
  for (int i = 0; i < n; ++i) {
    auto *cur = dp[i + 1];
    auto *prev = dp[i];
    auto *P = pp[i + 1];
    for (int j = 0; j < divs.size(); ++j) {
      cur[j] = prev[j];
      long long first = divs[j] / gcd(divs[j], b[i]);
      int p = ppp[first];
      if (uin(cur[j], prev[p] + a[i])) {
        P[j].first = 1;
        P[j].second = p;
      }
    }
  }
  if (dp[n][divs.size() - 1].cnt > n) {
    cout << "-1\n";
  } else {
    int p = divs.size() - 1;
    vector<int> take;
    for (int i = n; i >= 1; --i) {
      if (pp[i][p].first) {
        take.push_back(i);
        p = pp[i][p].second;
      }
    }
    assert(take.size() == dp[n][divs.size() - 1].cnt);
    cout << take.size() << "\n";
    reverse((take).begin(), (take).end());
    long long s = 0;
    for (int first : take) {
      s += a[first - 1];
    }
    assert(s == dp[n][divs.size() - 1].sum);
    for (int first : take) {
      cout << first << " ";
    }
    cout << "\n";
  }
}
int main(int argc, char **argv) {
  int t = 1;
  int c = 0;
  while (t--) {
    solve(++c);
  }
  return 0;
}