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 javafx.scene.layout.Priority;
import java.io.*;
import java.lang.reflect.Array;
import java.net.Inet4Address;
import java.util.*;
import java.lang.*;
import java.util.HashMap;
import java.util.PriorityQueue;
public class templ implements Runnable{
    static class pair implements Comparable
    {
        int f;
        int s;
        pair(int fi,int se)
        {
            f=fi;
            s=se;
        }
        public int compareTo(Object o)
        {
            pair pr=(pair)o;
            if(s>pr.s)
                return 1;
            if(s==pr.s)
            {
                if(f<pr.f)
                    return 1;
                else
                    return -1;
            }
            else
                return -1;
        }
        public boolean equals(Object o)
        {
            pair ob=(pair)o;
            int ff;
            int ss;
            if(o!=null)
            {
                ff=ob.f;
                ss=ob.s;
                if((ff==this.f)&&(ss==this.s))
                    return true;
            }
            return false;
        }
        public int hashCode()
        {
            return (this.f+" "+this.s).hashCode();
        }
    }
    public class triplet implements Comparable
    {
        int f,t;
        int s;
        triplet(int f,int s,int t)
        {
            this.f=f;
            this.s=s;
            this.t=t;
        }
        public boolean equals(Object o)
        {
            triplet ob=(triplet)o;
            int ff;
            int ss;
            int tt;
            if(o!=null)
            {
                ff=ob.f;
                ss=ob.s;
                tt=ob.t;
                if((ff==this.f)&&(ss==this.s)&&(tt==this.t))
                    return true;
            }
            return false;
        }
        public int hashCode()
        {
            return (this.f+" "+this.s+" "+this.t).hashCode();
        }
        public int compareTo(Object o)
        {
            triplet tr=(triplet)o;
            if(t>tr.t)
                return 1;
            else
                return -1;
        }
    }
    int tree[],m[];
    int gcd(int x,int y)
    {
        if(x%y==0)
            return y;
        else
            return(gcd(y,x%y));
    }
    void build(int node,int start,int end)
    {
        if(start==end)
        {
            tree[node]=m[start];
            return;
        }
        int mid=(start+end)/2;
        build(2*node,start,mid);
        build(2*node+1,mid+1,end);
        tree[node]=gcd(tree[2*node],tree[2*node+1]);
    }
    pair queryr(int node,int start,int end,int l,int r,int val)
    {
        if(end<l||r<start||l>r)
            return new pair(0,0);
        if(start>=l&&end<=r)
        {
            if(tree[node]%val==0)
                return new pair(end-start+1,0);
            else if(end-start==0)
                return new pair(0,1);
            else
            {
                int mid=(start+end)/2;
                pair p1=queryr(2*node+1,mid+1,end,l,r,val);
                pair p2=new pair(0,1);
                if(p1.s==0)
                    p2=queryr(2*node,start,mid,l,r,val);
                //System.out.println((mid+1)+" "+end+" "+p1.f+" "+p1.s);
                //System.out.println(start+" "+end+" "+p2.f+" "+p2.s);
                return new pair(p1.f+p2.f,Math.max(p1.s,p2.s));
            }
        }
        int mid=(start+end)/2;
        pair p1=queryr(2*node+1,mid+1,end,l,r,val);
        pair p2=new pair(0,1);
        if(p1.s==0)
            p2=queryr(2*node,start,mid,l,r,val);
        return new pair(p1.f+p2.f,Math.max(p1.s,p2.s));
    }
    pair queryl(int node,int start,int end,int l,int r,int val)
    {
        if(end<l||r<start||l>r)
            return new pair(0,0);
        if(start>=l&&end<=r)
        {
            if(tree[node]%val==0)
                return new pair(end-start+1,0);
            else if(end-start==0)
                return new pair(0,1);
            else
            {
                int mid=(start+end)/2;
                pair p1=queryl(2*node,start,mid,l,r,val);
                pair p2=new pair(0,1);
                if(p1.s==0)
                    p2=queryl(2*node+1,mid+1,end,l,r,val);
                return new pair(p1.f+p2.f,Math.max(p1.s,p2.s));
            }
        }
        int mid=(start+end)/2;
        pair p1=queryl(2*node,start,mid,l,r,val);
        pair p2=new pair(0,1);
        if(p1.s==0)
            p2=queryl(2*node+1,mid+1,end,l,r,val);
        return new pair(p1.f+p2.f,Math.max(p1.s,p2.s));
    }
    public static void main(String args[])throws Exception
    {
        new Thread(null,new templ(),"templ",1<<27).start();
    }
    public void run()
    {
        try
        {
            InputReader in = new InputReader(System.in);
            PrintWriter out = new PrintWriter(System.out);
            int n=in.ni();
            m=new int[n+1];
            tree=new int[4*n+1];
            for(int i=1;i<=n;i++)
                m[i]=in.ni();
            build(1,1,n);
            int l[]=new int[n+1];
            int r[]=new int[n+1];
            for(int i=1;i<=n;i++)
            {
                l[i]=queryr(1,1,n,1,i-1,m[i]).f;
                r[i]=queryl(1,1,n,i+1,n,m[i]).f;
                //out.println(l[i]+" "+r[i]);
                r[i]+=l[i];
            }
            int max=0;
            for(int i=1;i<=n;i++)
                max=Math.max(max,r[i]);
            TreeSet<Integer>al=new TreeSet<>();
            for(int i=1;i<=n;i++)
            {
                if(r[i]==max)
                {
                    al.add(i-l[i]);
                }
            }
            out.println(al.size()+" "+max);
            for(int i : al)
                out.print(i+" ");
            out.close();
        }
        catch(Exception e){
            return;
        }
    }
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

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

        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }
}