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.*;
import java.util.*;
import java.util.concurrent.BrokenBarrierException;

import javax.swing.text.html.MinimalHTMLWriter;

import static java.lang.Math.abs;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.sqrt;

public class Main {


    public static void main(String [] args){
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Integer readFromFile=new Integer(1);
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskD {
        void madAdd(Map <Integer, Integer> map, int value){
            if(map.containsKey(value)){
                map.put(value, map.get(value)+1);
            }else{
                map.put(value, 1);
            }
        }
        //I have to try at least two ways to solve this problem, I'll make one of them with ;
        class Pair implements Comparable<Pair>{
            int fist;
            int second;
            Pair(int fist, int second){
                this.fist = fist;
                this.second = second;
            }
            @Override
            public int compareTo(Pair arg0) {
                return fist-arg0.fist;
            }
        }
        int _gdc(int a, int b){
            if(a%b==0){
                return b;
            }else{
                return gdc(b, a%b);
            }
        }
        int gdc(int a, int b){
            if(a>=b){
                return _gdc(a, b);
            }else{
                return _gdc(b, a);
            }
        }



        boolean isPassedF(int []array, int c){
            boolean isPassed = false;
            long sum=0;
            for(int i=0, sum1=c; i<array.length-1; i++){
                if(sum1+array[i]-array[i+1]<0){
                    isPassed=true;
                    break;
                }else{
                    sum1+=array[i]-array[i+1];
                }
            }
            return isPassed;
        }
        int pow(int a, int n){
            int result = 1;
            for(int i=0; i<n; i++){
                result*=a;
            }
            return result;
        }




        void eratos(byte []primeNum){
            int size = primeNum.length;
            for(int i=2; i*i<size; i++){
                if(primeNum[i]==0){
                    for(int j=i+i; j<size; j+=i){
                        primeNum[j]=1;
                    }
                }
            }
        }





        public void solve(int testNumber, InputReader in, PrintWriter out) {


            //2 ways and sort
            int n = in.nextInt();
            int m = in.nextInt();
            //int []arr = new int[n];
            List<Pair> listArr = new ArrayList<>(n);
            final int maxValue = 1000001;
            int []dp = new int[maxValue];
            int []dp1 = new int[maxValue];
            for(int i=0; i<n; i++){
                int value = in.nextInt();
                listArr.add(new Pair(value, i+1));
                if(value<=maxValue){
                    dp[value]++;
                }
            }
            Collections.sort(listArr);
            byte []isVisited = new byte[maxValue];
            for(int i=0; i<listArr.size(); i++){
                if(listArr.get(i).fist>maxValue-1){
                    break;
                }
                if(isVisited[listArr.get(i).fist]==1){
                    continue;
                }
                for(int j=listArr.get(i).fist; j<maxValue; j+=listArr.get(i).fist){
                    dp1[j]+=dp[listArr.get(i).fist];
                }
                isVisited[listArr.get(i).fist]=1;
            }

            int answer = 0;
            int answerValue = 0;
            for(int i=m; i>=0; i--){
                if(answer<=dp1[i]){
                    answer = dp1[i];
                    answerValue = i;
                }
            }
            if(answerValue==0){
                out.println(1+" "+0);
                return;
            }
            out.println(answerValue+" "+answer);
            List<Integer> intAnswer = new ArrayList<>(answer);
            for(int i=0; i<n; i++){
                if(answerValue%listArr.get(i).fist==0){
                    intAnswer.add(listArr.get(i).second);
                   //out.print(listArr.get(i).second+" ");
                }
            }
            Collections.sort(intAnswer);
            for(int i=0; i<intAnswer.size(); i++){
                out.print(intAnswer.get(i)+" ");
            }
        }

    }

    static class InputReader {
        BufferedReader br;
        StringTokenizer st;
        String st1;
        File file = new File("text.txt");
        public InputReader(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            st = null;
        }
        public InputReader(int i) {
            try {
                br  = new BufferedReader(
                        new InputStreamReader(new FileInputStream(file)));
            } catch (FileNotFoundException e1) {
                System.out.println("File is not find");
            }
            st = null;
        }
        public String next(){
            while (st==null || !st.hasMoreTokens()){
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public String nextLine(){
            try {
                st1 = new String(br.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return st1;
        }
        public int nextInt()  {return Integer.parseInt(next());}
        public long nextLong(){
            return Long.parseLong(next());
        }
        public Double nextDouble(){
            return Double.parseDouble(next());
        }
        public Byte nextByte() {
            return Byte.parseByte(next());
        }
        private int idx;
        public Character nextChar() {
            if(st1==null) {
                st1 = next();
                idx = 0;
            }
            if(idx!=(st1.length())-1){
                return st1.charAt(idx++);
            }else{
                char  c= st1.charAt(idx);
                st1 = null;
                return c;
            }
        }
        public void newFile() {
            try {
                FileWriter write = new FileWriter(file);
                write.write("something for cheaking");
                write.close();

            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        public void writeFile1(){
            try{
                FileWriter write = new FileWriter(file);
                write.append("100000"+" ");
                for(int i=0; i<100000; i++){
                    write.append(new Integer((int)(Math.random()*5000)).toString()+" ");
                }
                write.close();

            }catch(IOException e){
                e.printStackTrace();
            }
        }
    }
}