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.util.TreeSet;
import java.util.ArrayList;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.List;
import java.io.BufferedReader;
import java.util.Map;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.Set;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
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);
		TaskD solver = new TaskD();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskD {
    int N = (int) 1e6;

    public static class Node {
        List<Integer> primes;
        int left;
        boolean check = false;
        boolean isPrime = false;
    }

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        Node nodes[] = new Node[N + 1];
        for (int i = 1; i <= N; i++) {
            nodes[i] = new Node();
            nodes[i].primes = new ArrayList<>();
            nodes[i].left = i;
            nodes[i].check = false;
            nodes[i].isPrime = true;
        }
        int a[] = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
            nodes[a[i]].check = true;
        }
        for (int i = 2; i <= N; i++) {
            if (nodes[i].isPrime) {
                for (int h = i + i; h <= N; h += i) {
                    Node node = nodes[h];
                    node.isPrime = false;
                    if (node.check) {
                        int pow = 1;
                        while (node.left % i == 0) {
                            node.left /= i;
                            pow *= i;
                        }
                        node.primes.add(pow);
                    }
                }
            }
        }
        for (int i = 1; i <= N; i++) {
            if (nodes[i].check) {
                nodes[i].primes.add(nodes[i].left);
            }
        }
        HashMap<Integer, Pair<Integer, Integer>> mp = new HashMap<>();
        Set<Integer> set = new TreeSet<>();
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < n; i++) {
            int max_l = 0, min_r = n - 1;
            Node cur = nodes[a[i]];
            for (int h : cur.primes) {
                Pair<Integer, Integer> lr = explore(h, i, mp, nodes, a);
                max_l = Math.max(max_l, lr.fs);
                min_r = Math.min(min_r, lr.sc);
            }
            if (min_r - max_l > max) {
                max = min_r - max_l;
                set.clear();
                set.add(max_l);
            } else if (min_r - max_l == max) {
                set.add(max_l);
            }
        }

        out.println(set.size() + " " + max);
        for (int i : set) {
            out.print((i + 1) + " ");
        }
    }

    public Pair<Integer, Integer> explore(int pow,
                        int p,
                        Map<Integer, Pair<Integer, Integer>> mp,
                        Node nodes[],
                        int a[]) {
        if (mp.containsKey(pow)) {
            Pair<Integer, Integer> pr =  mp.get(pow);
            if (pr.fs <= p && pr.sc >= p) {
                return pr;
            }
        }

        int l = 0, r = 0;
        int i = p + 1;
        while (i < a.length) {
            if (!has(nodes[a[i]], pow)) {
                break;
            }
            i++;
        }
        r = i - 1;
        i = p - 1;
        while (i >= 0) {
            if (!has(nodes[a[i]], pow)) {
                break;
            }
            i--;
        }
        l = i + 1;

        mp.put(pow, new Pair<>(l, r));
        return mp.get(pow);
    }

    public boolean has(Node node, int pow) {
        for (int h = 0; h < node.primes.size(); h++) {
            if (node.primes.get(h) % pow == 0) {
                return true;
            }
        }
        return false;
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

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

}

class Pair<T, K> {
    T fs;
    K sc;

    public Pair(T fs, K sc) {
        this.fs = fs;
        this.sc = sc;
    }
}

