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 A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char& s) {
  string res = "'";
  res += s;
  res += "'";
  return res;
}
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (i) res += ", ";
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
void upd(pair<int, long long>& x, pair<int, long long> y, long long z) {
  if (x.first == -1) {
    x = {y.first + 1, y.second + z};
  } else {
    x = min(x, {y.first + 1, y.second + z});
  }
}
pair<int, long long> pr[1000 + 1][7000];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  long long k;
  cin >> n >> k;
  if (k == 1) {
    cout << 1 << '\n';
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    cout << min_element((a).begin(), (a).end()) - a.begin() + 1;
    return 0;
  }
  vector<long long> d;
  for (long long i = 1; i * i <= k; i++) {
    if (k % i == 0) {
      d.push_back(i);
      if (k / i != i) d.push_back(k / i);
    }
  }
  sort((d).begin(), (d).end());
  vector<long long> z;
  for (int i = 0; i < (int)(d).size(); i++) {
    int f = 1;
    for (int j = 0; j < i; j++) {
      if (d[i] % d[j] == 0 && d[j] != 1) f = 0;
    }
    if (f) z.push_back(d[i]);
  }
  unordered_map<long long, int> uk;
  for (int i = 0; i < (int)(d).size(); i++) uk[d[i]] = i;
  int m = (int)(d).size();
  vector<pair<pair<int, long long>, int>> tmp(m, {{-1, -1}, -1});
  vector<vector<int>> go(m, vector<int>((int)(z).size()));
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < (int)(z).size(); j++) {
      if (d[i] % z[j] != 0) {
        go[i][j] = i;
      } else
        go[i][j] = uk[d[i] / z[j]];
    }
  }
  tmp[m - 1] = {{0, 0}, 0};
  vector<pair<int, long long>> dp(m);
  vector<long long> cnt(m);
  for (int i = 1; i <= n; i++) {
    long long value;
    cin >> value;
    fill((dp).begin(), (dp).end(), make_pair(-1, -1));
    iota((cnt).begin(), (cnt).end(), 0);
    for (int v = 0; v < (int)(z).size(); v++) {
      int p = z[v];
      if (p == 1) continue;
      int c = 0;
      long long tmp = value;
      while (tmp % p == 0) c++, tmp /= p;
      for (int i = 0; i < m; i++) {
        for (int V = 0; V < c; V++) {
          if (go[cnt[i]][v] == cnt[i]) break;
          cnt[i] = go[cnt[i]][v];
        }
      }
    }
    for (int j = 0; j < m; j++) {
      if (tmp[j].second == -1) continue;
      int x = cnt[j];
      pair<int, long long> res = dp[x];
      upd(dp[x], tmp[j].first, value);
      if (dp[x] != res) {
        pr[i][x] = {tmp[j].second, j};
      }
    }
    for (int j = 0; j < m; j++) {
      if (dp[j].first == -1) continue;
      if (tmp[j].second == -1 || dp[j] < tmp[j].first) {
        tmp[j] = {dp[j], i};
      }
    }
  }
  if (tmp[0].second == -1) {
    cout << -1;
    return 0;
  }
  vector<int> ans;
  int id = tmp[0].second, j = 0;
  while (id > 0) {
    ans.push_back(id);
    tie(id, j) = pr[id][j];
  }
  cout << (int)(ans).size() << '\n';
  for (auto x : ans) cout << x << " ";
}