给你n个数字,求长度最长且符合以下条件的区间:区间【i,j】中存在某个数是这个区间所有数的约数。
可能有多个区间符合条件且长度都最长,
The first line contains integer n (1 ≤ n ≤ 3·105).
The second line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 106).
输出有两行
第一行有两个数:区间的数量,区间的最大长度-1
第二行分别输出每个区间的左端点的位置。
5
4 6 9 3 6
1 3
2
5
1 3 5 7 9
1 4
1
5
2 3 5 7 11
5 0
1 2 3 4 5
NoteIn 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).