Simon has an array a1, a2, ..., an, consisting of n positive integers. Today Simon asked you to find a pair of integers l, r (1 ≤ l ≤ r ≤ n), such that the following conditions hold:

  1. there is integer j (l ≤ j ≤ r), such that all integers al, al + 1, ..., ar are divisible by aj; 
  2. value r - l takes the maximum value among all pairs for which condition 1 is true; 



Help Simon, find the required pair of numbers (l, r). If there are multiple required pairs find all of them.

Input

The first line contains integer n (1 ≤ n ≤ 3·105).

The second line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 106).

Output

Print two integers in the first line — the number of required pairs and the maximum value of r - l. On the following line print all l values from optimal pairs in increasing order.

Examples

Input

5
4 6 9 3 6


Output

1 3
2 


Input

5
1 3 5 7 9


Output

1 4
1 


Input

5
2 3 5 7 11


Output

5 0
1 2 3 4 5 

Note

In the first sample the pair of numbers is right, as numbers 6, 9, 3 are divisible by 3.

In the second sample all numbers are divisible by number 1.

In the third sample all numbers are prime, so conditions 1 and 2 are true only for pairs of numbers (1, 1), (2, 2), (3, 3), (4, 4), (5, 5).
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.util.HashMap;
import java.util.TreeSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jenish
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        ScanReader in = new ScanReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DPairOfNumbers solver = new DPairOfNumbers();
        solver.solve(1, in, out);
        out.close();
    }

    static class DPairOfNumbers {
        int[][] dp;
        int[] arr;
        MinSeg minSeg;

        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            int l = 0;
            int r = 0;
            arr = new int[n];
            dp = new int[n][21];
            minSeg = new MinSeg(n);
            for (int i = 0; i < n; i++) arr[i] = in.scanInt();
            for (int i = 0; i < n; i++) minSeg.setMin(i, arr[i]);
            for (int i = 0; i < n; i++) dp[i][0] = arr[i];
            for (int j = 1; j <= 20; j++) {
                for (int i = 0; i < n; i++) {
                    if (i + (1 << (j - 1)) < n) dp[i][j] = CodeX.GCD(dp[i][j - 1], dp[i + (1 << (j - 1))][j - 1]);
                }
            }

            int max = 0;
            HashMap<Integer, TreeSet<Integer>> hm = new HashMap<>();
            for (int i = 0; i < n; i++) {
                int right = -1;
                {
                    int low = i;
                    int high = n - 1;
                    while (low <= high) {
                        int mid = (low + high) / 2;
                        if (gcd(i, mid) == arr[i]) {
                            right = mid;
                            low = mid + 1;
                        } else {
                            high = mid - 1;
                        }
                    }
                }


                int left = -1;
                {
                    int low = 0;
                    int high = i;
                    while (low <= high) {
                        int mid = (low + high) / 2;
                        if (gcd(mid, i) == arr[i]) {
                            left = mid;
                            high = mid - 1;
                        } else {
                            low = mid + 1;
                        }
                    }
                }
                int range = right - left;
                if (!hm.containsKey(range)) hm.put(range, new TreeSet<>());
                hm.get(range).add(left + 1);
                max = Math.max(range, max);

            }


            out.println(hm.get(max).size() + " " + (max));
            for (int k : hm.get(max)) out.print(k + " ");
        }

        int gcd(int l, int r) {
            int ans = 0;
            for (int i = 20; i >= 0 && l <= r; i--) {
                if ((1 << i) <= r - l + 1) {
                    ans = CodeX.GCD(ans, dp[l][i]);
                    l += (1 << i);
                }
            }
            return ans;
        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int INDEX;
        private BufferedInputStream in;
        private int TOTAL;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (INDEX >= TOTAL) {
                INDEX = 0;
                try {
                    TOTAL = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (TOTAL <= 0) return -1;
            }
            return buf[INDEX++];
        }

        public int scanInt() {
            int I = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    I *= 10;
                    I += n - '0';
                    n = scan();
                }
            }
            return neg * I;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

    }

    static class MinSeg {
        long[] tree;
        int n;

        public MinSeg(int n) {
            this.n = n;
            tree = new long[2 * n];
            Arrays.fill(tree, Long.MAX_VALUE);
        }

        public void setMin(int i, long value) {
            i += this.tree.length / 2;
            this.tree[i] = value;
            for (; i > 1; i >>= 1) this.tree[i >> 1] = Math.min(this.tree[i], this.tree[i ^ 1]);
        }

    }

    static class CodeX {
        public static int GCD(int A, int B) {

            if (A == 0) return B;
            if (B == 0)
                return A;
            else
                return GCD(B, A % B);
        }

    }
}

