You are given array a with n elements and the number m. Consider some subsequence of a and the value of least common multiple (LCM) of its elements. Denote LCM as l. Find any longest subsequence of a with the value l ≤ m.

A subsequence of a is an array we can get by erasing some elements of a. It is allowed to erase zero or all elements.

The LCM of an empty array equals 1.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 106) — the size of the array a and the parameter from the problem statement.

The second line contains n integers ai (1 ≤ ai ≤ 109) — the elements of a.

Output

In the first line print two integers l and kmax (1 ≤ l ≤ m, 0 ≤ kmax ≤ n) — the value of LCM and the number of elements in optimal subsequence.

In the second line print kmax integers — the positions of the elements from the optimal subsequence in the ascending order.

Note that you can find and print any subsequence with the maximum length.

Examples

Input

7 8
6 2 9 2 7 2 3


Output

6 5
1 2 4 6 7


Input

6 4
2 2 2 3 3 3


Output

2 3
1 2 3
#include <bits/stdc++.h>
using namespace std;
string to_string(string c) { return string(c); }
string to_string(char ch) { return string(1, ch); }
template <size_t N>
string to_string(bitset<N> B) {
  string second = "";
  for (long long i = 0; i < (long long)N; i++) second += (char)'0' + B[i];
  return second;
}
template <typename T, typename U>
string to_string(pair<T, U> P) {
  return "{" + to_string(P.first) + "," + to_string(P.second) + "}";
}
template <typename T>
string to_string(T A) {
  string second = "[";
  bool first = 0;
  for (auto x : A) {
    if (first) second += " ";
    first = 1;
    second += to_string(x);
  }
  return second + "]";
}
template <typename T, size_t N>
string to_string(T (&A)[N]) {
  string second = "[";
  bool first = 0;
  for (long long i = 0; i < N; i++) {
    if (first) second += " ";
    first = 1;
    second += to_string(A[i]);
  }
  return second + "]";
}
void _deb() {
  cerr << "]"
       << "\n";
}
template <typename T, typename... U>
void _deb(const T& t, const U&... u) {
  cerr << to_string(t);
  if (sizeof...(u)) cout << ", ";
  _deb(u...);
}
long long ceil(long long a, long long b) {
  return a / b + (a % b && (a ^ b) > 0);
}
long long floor(long long a, long long b) {
  return a / b - (a % b && (a ^ b) < 0);
}
long long SBITS(long long n) { return __builtin_popcountll(n); }
long long BITS(long long n) { return 63 - __builtin_clzll(n); }
const long long MX = 5e5 + 5;
const long long OO = 1e18;
const long long MOD = 1e9 + 7;
long long DX[8] = {1, 0, -1, 0, 1, -1, 1, -1};
long long DY[8] = {0, 1, 0, -1, 1, -1, -1, 1};
pair<long long, vector<long long> > solve() {
  long long n, m;
  cin >> n >> m;
  map<long long, long long> freq;
  pair<long long, vector<long long> > ans;
  ans.first = 1;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] <= m) freq[a[i]]++;
  }
  if (freq.empty()) return ans;
  vector<long long> k(m + 1, freq[1]);
  for (pair<long long, long long> x : freq) {
    for (long long i = x.first; i <= m; i += x.first) {
      k[i] += x.second;
    }
  }
  long long ctr = 0;
  for (long long i = 0; i <= m; i++)
    if (k[i] > ctr) ans.first = i, ctr = k[i];
  for (long long i = 0; i < n; i++) {
    if (ans.first % a[i] == 0) ans.second.push_back(i + 1);
  }
  return ans;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    pair<long long, vector<long long> > ans = solve();
    cout << ans.first << " " << (long long)ans.second.size() << "\n";
    sort(ans.second.begin(), ans.second.end());
    for (auto x : ans.second) cout << x << " ";
    cout << "\n";
  }
  return 0;
}
