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.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    long MOD = 1000000007L;
    public class Obj implements Comparable<Obj>{
        public int t;
        public int h;
        
        public Obj(int t_, int h_){
            t = t_;
            h = h_;
        }
        
        public int compareTo(Obj other){
            return t - other.t;
        }
        
    }
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
        Codechef cf = new Codechef();
        cf.Solve();
	}
	
	int[][] tree;
	int[] lazy;
	
	public int GCD(int a, int b){
	    while (b > 0){
	        int tmp = b;
	        b = a % b;
	        a = tmp;
	    }
	    return a;
	}
	
	public void Solve(){
        MyScanner sc = new MyScanner();
        int n = sc.nextInt();
        int[] arr = new int[n+1];
        int[] left = new int[n+1];
        int[] right = new int[n+1];
        int[] S = new int[n+1];
        int[] id = new int[n+1];
        for (int i = 1; i <= n; ++i){
            arr[i] = sc.nextInt();
        }
        int top = 0;
        for (int i = 1; i <= n; ++i){
            while (top > 0 && S[top] % arr[i] == 0) top--;
            // System.out.println(top + " " + S[top] + " " + arr[i]);
            left[i] = id[top] + 1;
            S[++top] = arr[i];
            id[top] = i;
            // System.out.println(left[i] + " ");
        }
        // System.out.println();
        top = 0;
        id[top] = n + 1;
        for (int i = n; i > 0; --i){
            while (top > 0 && S[top] % arr[i] == 0) top--;
            right[i] = id[top]-1;
            S[++top] = arr[i];
            id[top] = i;
            // System.out.println(i + " " + right[i]);
        }
        
        int best = 0;
        for (int i = 1; i <= n; ++i){
            int k = right[i] - left[i];
            best = Math.max(best, k);
        }
        
        SortedSet<Integer> res = new TreeSet<Integer>();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        for (int i = 1; i <= n; ++i){
            int k = right[i] - left[i];
            if (k == best){
                res.add(left[i]);
            }
        }
        out.println(res.size() + " " + best);
        for (int num : res){
            out.print(num + " ");
        }
        out.close();
	}
	
	public void BuildTree(int node, int l, int r){
	   // System.out.println(node + " " + l + " " + r);
	    if (l == r){
	        tree[node][0] = 1;
	        return;
	    }
	    int mid = l + (r - l) / 2;
	    BuildTree(node * 2, l, mid);
	    BuildTree(node * 2 + 1, mid + 1, r);
	    tree[node][0] = tree[node*2][0] + tree[node*2 + 1][0];
	}
	
	public void UpdateRange(int node, int st, int ed, int l, int r, int diff){
	    if (lazy[node] != 0){
	        int k = lazy[node] % 3;
	        if (k == 2){
	            int tmp = tree[node][0];
	            tree[node][0] = tree[node][1];
	            tree[node][1] = tree[node][2];
	            tree[node][2] = tmp;
	        }else if (k == 1){
	            int tmp = tree[node][0];
	            tree[node][0] = tree[node][2];
	            tree[node][2] = tree[node][1];
	            tree[node][1] = tmp;
	        }
	        
	        if (st != ed){
	            lazy[node*2] += lazy[node];
	            lazy[node*2 + 1] += lazy[node];
	        }
	        lazy[node] = 0;
	    }
	    
	    if (st > ed || st > r || ed < l) return;
	    
	    if (l <= st && ed <= r){
	        int tmp = tree[node][0];
	        tree[node][0] = tree[node][2];
	        tree[node][2] = tree[node][1];
	        tree[node][1] = tmp;
	        if (st != ed){
	            lazy[node * 2] += diff;
	            lazy[node * 2 + 1] += diff;
	        }
	        return;
	    }
	    int mid = st + (ed - st) / 2;
	    UpdateRange(node * 2, st, mid, l, r, diff);
	    UpdateRange(node * 2 + 1, mid + 1, ed, l, r, diff);
	    for (int i = 0; i < 3; ++i){
	        tree[node][i] = tree[node*2][i] + tree[node*2 + 1][i];
	    }
	}
	
	public int QueryRange(int node, int st, int ed, int l, int r){
	   // System.out.println(node + " " + st + " " + ed);
	    if (lazy[node] != 0){
	        int k = lazy[node] % 3;
	        if (k == 2){
	            int tmp = tree[node][0];
	            tree[node][0] = tree[node][1];
	            tree[node][1] = tree[node][2];
	            tree[node][2] = tmp;
	        }else if (k == 1){
	            int tmp = tree[node][0];
	            tree[node][0] = tree[node][2];
	            tree[node][2] = tree[node][1];
	            tree[node][1] = tmp;
	        }
	        
	        if (st != ed){
	            lazy[node*2] += lazy[node];
	            lazy[node*2 + 1] += lazy[node];
	        }
	        lazy[node] = 0;
	    }
	    
	    if (st > ed || st > r || ed < l) return 0;
	    if (l <= st && ed <= r){
	       return tree[node][0]; 
	    }
	    int mid = st + (ed - st) / 2;
	    int p1 = QueryRange(node * 2, st, mid, l, r);
	    int p2 = QueryRange(node * 2 + 1, mid + 1, ed, l, r);
	    return (p1 + p2);
	}
	

	//-----------PrintWriter for faster output---------------------------------
   public static PrintWriter out;
      
   //-----------MyScanner class for faster input----------
   public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
      try {
         str = br.readLine();
      } catch (IOException e) {
         e.printStackTrace();
      }
      return str;
      }

   }
}