Bajtek, known for his unusual gifts, recently got an integer array x_0, x_1, …, x_{k-1}.

Unfortunately, after a huge array-party with his extraordinary friends, he realized that he'd lost it. After hours spent on searching for a new toy, Bajtek found on the arrays producer's website another array a of length n + 1. As a formal description of a says, a_0 = 0 and for all other i (1 ≤ i ≤ n) a_i = x_{(i-1)mod k} + a_{i-1}, where p mod q denotes the remainder of division p by q.

For example, if the x = [1, 2, 3] and n = 5, then:

  * a_0 = 0, 
  * a_1 = x_{0mod 3}+a_0=x_0+0=1, 
  * a_2 = x_{1mod 3}+a_1=x_1+1=3, 
  * a_3 = x_{2mod 3}+a_2=x_2+3=6, 
  * a_4 = x_{3mod 3}+a_3=x_0+6=7, 
  * a_5 = x_{4mod 3}+a_4=x_1+7=9. 



So, if the x = [1, 2, 3] and n = 5, then a = [0, 1, 3, 6, 7, 9].

Now the boy hopes that he will be able to restore x from a! Knowing that 1 ≤ k ≤ n, help him and find all possible values of k — possible lengths of the lost array.

Input

The first line contains exactly one integer n (1 ≤ n ≤ 1000) — the length of the array a, excluding the element a_0.

The second line contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^6).

Note that a_0 is always 0 and is not given in the input.

Output

The first line of the output should contain one integer l denoting the number of correct lengths of the lost array.

The second line of the output should contain l integers — possible lengths of the lost array in increasing order.

Examples

Input

5
1 2 3 4 5


Output

5
1 2 3 4 5 

Input

5
1 3 5 6 8


Output

2
3 5 

Input

3
1 5 3


Output

1
3 

Note

In the first example, any k is suitable, since a is an arithmetic progression.

Possible arrays x:

  * [1]
  * [1, 1]
  * [1, 1, 1]
  * [1, 1, 1, 1] 
  * [1, 1, 1, 1, 1]



In the second example, Bajtek's array can have three or five elements.

Possible arrays x:

  * [1, 2, 2]
  * [1, 2, 2, 1, 2]



For example, k = 4 is bad, since it leads to 6 + x_0 = 8 and 0 + x_0 = 1, which is an obvious contradiction.

In the third example, only k = n is good.

Array [1, 4, -2] satisfies the requirements.

Note that x_i may be negative.
import java.io.*;
import java.util.*;
public class Main {
    static PrintWriter pw;
    static ArrayList<Integer>[] adj;
    static StringBuilder sb;
    static int[] visit;
    static boolean[] remove;
    static long ans;
    static int temp;
    static int max;
    static void dfs(int i, int c) {
        visit[i]=c;
        if(c!=1)
            temp++;
        for(int x: adj[i]){
            if(visit[x-1]==0)
                dfs(x-1, c+1);
            if(c==1){
                ans+=temp;
                max=Math.max(max, temp);
                temp=0;
            }
        }
    }
    public static long gcf(long x, long y) {
        while(x%y!=0 && y%x!=0) {
            if(x>y)
                x%=y;
            else
                y%=x;
        }
        return x>y? y:x;
    }
    static int ceildiv(int x, int y){
        return x%y==0? x/y: x/y+1;
    }
    static long pow(long a, long pow){
        long ans=1;
        while(pow>0){
            if((pow&1)==1)
                ans*=a;
            a*=a;
            pow>>=1;
        }
        return ans;
    }
    static boolean prime(int x) {
        for(int i=2; i<=x/i; i++) {
            if(x%i==0)
                return false;
        }
        return true;
    }
    static boolean check(int len, int[] arr){
        for(int i=0; i<arr.length-len; i++){
            if(arr[i]!=arr[i+len])
                return false;
        }
        return true;
    }
    static ArrayList<Character>[] arr;
    public static void main(String[] args) throws Exception {
        Input sc = new Input(System.in);
        pw = new PrintWriter(System.out);
        int n=sc.nextInt();
        int[] arr=sc.nextArr(n);
        int[] ans=new int[n];
        for(int i=0, x=0; i<n; i++){
            ans[i]=arr[i]-x;
            x=arr[i];
        }
        ArrayList<Integer> list= new ArrayList<Integer>();
        for(int len=1; len<=n; len++){
            if(check(len, ans))
                list.add(len);
        }
        pw.println(list.size());
        for(int i=0; i<list.size()-1; i++)
            pw.print(list.get(i)+" ");
        pw.println(list.get(list.size()-1));
        pw.close();
    }
    static class Input {
        StringTokenizer st;
        BufferedReader br;
        public Input(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Input(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return this.x*1000+this.y;
        }
        public int compareTo(Pair other) {
            if(this.y!=other.y){
                return other.y-this.y;
            }else{
                return (this.x-other.x);
            }
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x == p.x;
        }
        public boolean equal(Pair p){
            return this.x==p.x && this.y==p.y;
        }
    }
    static class tuple implements Comparable<tuple>{
        int x;int y;int z;
        public tuple(int x, int y, int z){
            this.x=x;
            this.y=y;
            this.z=z;
        }
        public int compareTo(tuple other) {
            if(this.x!=other.x)
                return this.x-other.x;
            else {
                if(this.y!=other.y)
                    return this.y-other.y;
                else
                    return this.z-other.z;
            }
        }
        public boolean equal(tuple t){
            return this.x==t.x && this.y==t.y;
        }
    }
}
