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.*;
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.flush();out.close();
    }
        static class TaskE {
         int fa[],fb[];
         void upda(int id,int val,int max){
          while(id<=max){
           fa[id]+=val;id+=id&-id;
          }
         }
         void updb(int id,int val,int max){
          while(id<=max){
           fb[id]+=val;id+=id&-id;
          }
         }
         int geta(int id){
          int ans=0;
          while(id>0){
           ans+=fa[id];id-=id&-id;
          }return ans;
         }
         int getb(int id){
          int ans=0;
          while(id>0){
           ans+=fb[id];id-=id&-id;
          }return ans;
         }
         int p[];
         void s(){
          for(int i=2;i<=1000000;i+=2)p[i]=2;
          for(int i=3;i<=1000000;i+=2){
           for(int j=i;j<=1000000;j+=i){
            if(p[j]==j)p[j]=i;
           }
          }
         }
         int lcm(int a,int b){
          int gcd=gcd(a,b);
          return (a*b)/gcd;
         }
         int gcd(int a,int b){
          if(a%b==0)return b;
          return gcd(b,a%b);
         }
         public void solve(int testNumber, InputReader in, PrintWriter out) {
             int n=in.nextInt(),m=in.nextInt();
             int a[]=new int[1000001];
             int b[]=new int[n];
             //p=new int[1000001];
             //for(int i=0;i<=1000000;i++)p[i]=i;s();
             for(int i=0;i<n;i++){
               b[i]=in.nextInt();
               if(b[i]<=m)a[b[i]]++;
             }
             int lcm[]=new int[1000001];
             int c[]=new int[m+100];
             Arrays.fill(lcm,1);
             for(int i=1;i<=m;i++){
              if(a[i]==0)continue;
              for(int j=i;j<=m;j+=i){//System.out.println(j+" "+lcm[j]+" "+i);
               c[j]+=a[i];lcm[j]=lcm(lcm[j],i);
              }
             }
             int kmax=0,kl=1;
             for(int i=1;i<=m;i++){
              //if(lcm[i]==i){
               if(c[i]>kmax){
                kmax=c[i];kl=i;
               }
              //}
             }
             out.println(kl+" "+kmax);
             for(int i=0;i<n;i++){
              if(kl%b[i]==0)out.print((i+1)+" ");
             }
         }
    }
        /*
7 6000
6 2 8 2 8 2 100
        */
        /*
        2 5
        2 3
        */
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;
        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
            st = null;
        }

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

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}