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
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.util.Map;
import java.util.HashMap;


/**
 * Created by yujiahao on 3/1/16.
 */
public class cf_632_d {
    private FastScanner in;
    private PrintWriter out;

    public void solve() throws IOException {
        int n = in.nextInt();
        int m = in.nextInt();
        int size = 1000002;

        int[] cnt = new int[size];
        int[] arr = new int[n];

        for (int i=0; i<n; i++) {
            int cur = in.nextInt();
            arr[i] = cur;
            if (cur<=m)
                cnt[cur]++;
        }

        int[] ans = new int[m+1];
        for (int i=1; i<=m; i++){
            for (int j=i; j<=m; j=j+i){
                ans[j] += cnt[i];
            }
        }

        int max = 0;
        int lcm = 1;
        for (int i=1; i<=m; i++){
            if (ans[i]>max){
                max = ans[i];
                lcm = i;
            }
        }

        out.print(lcm + " ");
        out.println(max);

        for (int i=0; i<n; i++){
            if (lcm % arr[i]==0) {
                out.print(i + 1);
                out.print(" ");
            }
        }

    }


    public void solve2() throws IOException {
        int n = in.nextInt();
        int m = in.nextInt();
        int[] a = new int[n];
        boolean[] b = new boolean[n];

        for (int i = 0; i < n; i++) {
            int cur = in.nextInt();
            if (cur <= m) {
                a[i] = cur;
                b[i] = true;
            }
        }

        HashMap<Long, Integer> map_l = new HashMap<Long, Integer>();

        HashMap<Long, int[]> map = new HashMap<Long, int[]>();

        for (int i = 0; i < n; i++) {
            if (b[i] == false) continue;
            for (int j = i + 1; j < n; j++) {
                if (b[j] == false) continue;
                long curLcm = lcm(a[i], a[j]);
                if (curLcm>m)   continue;

                if (map.containsKey(curLcm)) {
                    int[] idx = map.get(curLcm);
                    idx[i] = 1;
                    idx[j] = 1;
                } else {
                    int[] idx = new int[n];
                    idx[i] = 1;
                    idx[j] = 1;
                    map.put(curLcm, idx);
                }
            }
        }

        int max = 0;
        long resKey = 0;

        for (Map.Entry<Long, int[]> entry : map.entrySet()) {
            Long key = entry.getKey();
            if (key>m) continue;
            int[] arr = entry.getValue();
            int count = 0;
            for (int i=0; i<n; i++){
                if (arr[i] == 1){
                    count++;
                }
            }

            if (count>max){
                max = count;
                resKey = key;
            }

        }

        int[] res_arr = map.get(resKey);

        out.print(resKey);
        out.print(" ");
        out.println(max);

        for (int i = 0; i < n; i++) {
            if (res_arr[i] == 1) {
                out.print(i+1);
                out.print(" ");
            }
        }


    }

    private int gcd(int a, int b) {
        while (b > 0) {
            int temp = b;
            b = a % b; // % is remainder
            a = temp;
        }
        return a;
    }

    private long lcm(int a, int b) {
        return a * (b / gcd(a, b));
    }

    public void run() {
        try {
            in = new FastScanner();
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    private class FastScanner {
        private BufferedReader br;
        private StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

    }

    public static void main(String[] arg) {
        new cf_632_d().run();
    }
}
