#d11006. 山脉
山脉
Mountain Range
Problem Description
For a sequence , a subsegment is called mountain-shaped if there exists an index such that is non-decreasing, is non-increasing, and .
For an integer (), if the subsegments $[1, k], [k+1, 2k], \dots, [(m-1)k+1, mk], [mk+1, n]$ are all mountain-shaped, and , , then we call the sequence a mountain range.
You are given a positive integer sequence , where a value of may stand for any number. Find all integers for which is a mountain range.
Input Format
The first line contains an integer (), the length of the sequence.
The second line contains integers ( or ).
Output Format
The first line contains an integer , the number of valid .
Then output lines, each containing one valid integer in ascending order.
Sample Input
11
7 -1 11 10 -1 -1 26 14 9 12 -1
Sample Output
1
4