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.math.BigInteger;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.IntStream;

public class Main {
    InputStream is;
    BufferedReader bufferedReader;
    PrintWriter out;
    String INPUT = "";


    int row[] = { -1, 0, 1, 0 };
    int column[] = { 0, 1, 0, -1 };



    void solve() {

        int n = ni();
        int a[] = new int[n+2];
        a[0] = 0;
        for (int i = 1; i <= n; ++i) {
            a[i] = ni();
        }

        int count = 1;

        ArrayList<Integer> ans = new ArrayList<>();

        while (count <= n) {

            int diff[] = new int[n+2];
            diff[0] = 0;
            for (int j = 1; j <= count; ++j) {
                diff[j-1] = a[j] - a[j-1];
            }
            int newA[] = new int[n+2];
            newA[0] = 0;
            boolean flag = false;
            for (int j = 1; j <= n; ++j) {
                newA[j] = diff[(j-1)%count] + newA[j-1];
                if (newA[j] != a[j]) {
                    flag = true;
                    break;
                }
            }
            if (!flag) {
                ans.add(count);
            }
            count++;
        }

        out.println(ans.size());
        ans.forEach( i -> out.print(i + " "));
    }

    boolean isPrime(long n) {
        //check if n is a multiple of 2
        if (n%2==0) return false;
        //if not, then just check the odds
        for(int i=3;i*i<=n;i+=2) {
            if(n%i==0)
                return false;
        }
        return true;
    }

    boolean compute(long n, long sub, Map<Long, Boolean> map) {
        if (map.get(sub) == null && (n-sub > sub || n - sub == 0 )) {
            return true;
        } else {
            return false;
        }
    }

    private int solve (char[][]matrix, int x, int y, int ml, int mr, int sx, int sy, int n, int m, boolean[][] visit) {
        if (x < 0 || y < 0 || x >= n || y >= m || visit[x][y]) {
            visit[x][y] = true;
            return 0;
        }

        visit[x][y] = true;


        if (matrix[x][y] == '*') {
            return 0;
        }
        if (y <= sy && sy - y <= ml) {
            return  1 +  solve(matrix, x+1, y, ml, mr, sx, sy, n, m, visit) + solve(matrix, x, y+1, ml, mr, sx, sy, n, m, visit)
                    + solve(matrix, x-1, y, ml, mr, sx, sy, n, m, visit) +solve(matrix, x, y-1, ml, mr, sx, sy, n, m, visit);

        }
        else if (y >= sy && y - sy <= mr) {
            return  1 + solve(matrix, x+1, y, ml, mr, sx, sy, n, m, visit) + solve(matrix, x, y+1, ml, mr, sx, sy, n, m, visit)
                    + solve(matrix, x-1, y, ml, mr, sx, sy, n, m, visit) +solve(matrix, x, y-1, ml, mr, sx, sy, n, m, visit);

        }
        return 0;
    }

    private BigInteger modulo(BigInteger a, BigInteger b, BigInteger c) {
        BigInteger t1 = a.mod(c);
        BigInteger t2 = b.mod(c);
        BigInteger t3 = t1.multiply(t2);
        return t3.mod(c);

//        BigInteger x= BigInteger.valueOf(1);
//        BigInteger y=a;
//        while(b.compareTo(BigInteger.valueOf(0)) > 0){
//            if(b.mod(BigInteger.valueOf(2)).equals( BigInteger.valueOf(1))){
//                x= x.multiply(y).mod(c);
//            }
//            y = y.multiply(y).mod(c); // squaring the base
//            b = b.divide(BigInteger.valueOf(2));
//        }
//        return x.mod(c);
    }

    private boolean sameBlock(String f, String t, int j) {
        return f.charAt(j) == '#' && t.charAt(j) == '#' || f.charAt(j) == '#' && t.charAt(j - 1) == '#' || f.charAt(j - 1) == '#' && t.charAt(j) == '#';
    }





    void run() throws Exception {
        is =  System.in;

        //is = new BufferedInputStream(new FileInputStream("./input.txt"));

        out = new PrintWriter(System.out);

        //out = new PrintWriter(new BufferedWriter(new FileWriter("./output.txt")));

        long s = System.currentTimeMillis();
        solve();
        //inputThird();
        out.close();
        //tr(System.currentTimeMillis()-s+"ms");
    }

    public static void main(String[] args) throws Exception {
        new Main().run();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if(lenbuf == -1)throw new InputMismatchException();
        if(ptrbuf >= lenbuf){
            ptrbuf = 0;
            try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
            if(lenbuf <= 0)return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
    private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
    private boolean isNewLineChar(int c) { return c == 10;}

    private double nd() { return Double.parseDouble(ns()); }
    private char nc() { return (char)skip(); }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private String nsTillNewLine() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isNewLineChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private String nsF() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while((isSpaceChar(b)) && b!=' '){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while(p < n && !(isSpaceChar(b))){
            buf[p++] = (char)b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }

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

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        long b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}