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.regex.*;
import java.util.stream.*;

public class D {
    private static InputReader in = new InputReader(System.in);
    private static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        new D().solve();
    }

    private final void solve() {
        int n = in.nextInt();
        int m = in.nextInt();
        int[] a = in.nextIntArray(n, 1);

        int[] cnt = new int[m + 1];
        HashMap<Integer, Integer> occ = new HashMap<>();
        for(int i = 1; i <= n; ++i) {
            occ.put(a[i], occ.getOrDefault(a[i], 0) + 1);
        }
        
        for(Map.Entry<Integer, Integer> e : occ.entrySet()) {
            for(int i = e.getKey(); i <= m; i += e.getKey()) {
                cnt[i] += e.getValue();
            }
        }

        int mx = 1;
        for(int i = 2; i <= m; ++i) {
            if(cnt[i] > cnt[mx]) {
                mx = i;
            }
        }

        out.println(mx + " " + cnt[mx]);
        for(int i = 1; i <= n; ++i) {
            if(mx % a[i] == 0) {
                out.print(i + " ");
            }
        }

        done();
    }

    private final void done() {
        out.close();
        System.exit(0);
    }
}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1 << 12];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int[] nextIntArray(int tokens, int offset) {
        int[] ret = new int[tokens + offset];
        for (int i = 0; i < tokens; i++) {
            ret[i + offset] = nextInt();
        }
        return ret;
    }

    public int[] nextIntArray(int tokens) {
        return nextIntArray(tokens, 0);
    }

    public int read() {
        if (this.numChars == -1) {
            throw new InputMismatchException();
        } else {
            if (this.curChar >= this.numChars) {
                this.curChar = 0;

                try {
                    this.numChars = this.stream.read(this.buf);
                } catch (IOException ex) {
                    throw new InputMismatchException();
                }

                if (this.numChars <= 0) {
                    return -1;
                }
            }

            return this.buf[this.curChar++];
        }
    }

    public int nextInt() {
        int c;
        for (c = this.read(); isSpaceChar(c); c = this.read()) {
        }

        byte sgn = 1;
        if (c == 45) {
            sgn = -1;
            c = this.read();
        }

        int res = 0;

        while (c >= 48 && c <= 57) {
            res *= 10;
            res += c - 48;
            c = this.read();
            if (isSpaceChar(c)) {
                return res * sgn;
            }
        }

        throw new InputMismatchException();
    }

    public long nextLong() {
        int c;
        for (c = this.read(); isSpaceChar(c); c = this.read()) {
        }

        byte sgn = 1;
        if (c == 45) {
            sgn = -1;
            c = this.read();
        }

        long res = 0;

        while (c >= 48 && c <= 57) {
            res *= 10L;
            res += c - 48;
            c = this.read();
            if (isSpaceChar(c)) {
                return res * sgn;
            }
        }
        throw new InputMismatchException();
    }

    public double nextDouble() {
        double ret = 0, div = 1;
        int c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        } while ((c = read()) >= '0' && c <= '9');

        if (c == '.') {
            while ((c = read()) >= '0' && c <= '9') {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    public String next() {
        int c;
        while (isSpaceChar(c = this.read())) {
        }

        StringBuilder result = new StringBuilder();
        result.appendCodePoint(c);

        while (!isSpaceChar(c = this.read())) {
            result.appendCodePoint(c);
        }

        return result.toString();
    }

    public String nextLine() {
        int c;
        StringBuilder result = new StringBuilder();
        boolean read = false;
        while ((c = this.read()) != '\n') {
            if (c == -1)
                return null;
            result.appendCodePoint(c);
            read = true;
        }
        if (!read)
            return null;
        return result.toString();
    }

    public static boolean isSpaceChar(int c) {
        return c == 32 || c == 10 || c == 13 || c == 9 || c == -1;
    }
}