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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.stream.Stream;
import java.util.Collection;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author noone
 */
public class Main {
        public static void main(String[] args) {
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(inputStream);
                PrintWriter out = new PrintWriter(outputStream);
                TaskB solver = new TaskB();
                solver.solve(1, in, out);
                out.close();
        }

        static class TaskB {
                ArrayList<Integer> arrayList = new ArrayList<>();

                public void solve(int testNumber, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int[] a = in.ia(n);
                        if (n == 1) {
                                out.println(1);
                                out.println(1);
                                return;
                        }
                        if (n == 2) {
                                if (a[1] == 2 * a[0]) {
                                        out.println(2);
                                        out.println(1 + " " + 2);
                                } else {
                                        out.println(1);
                                        out.println(2);
                                }
                                return;
                        }
                        boolean checkinglengthOne = false;
                        int dif = a[1] - a[0];
                        for (int i = 2; i < n; i++) {
                                if (dif == a[i] - a[i - 1]) {
                                        checkinglengthOne = true;
                                } else {
                                        checkinglengthOne = false;
                                        break;
                                }
                        }
                        if (checkinglengthOne) arrayList.add(1);

                        for (int length = 2; length < n; length++) {
                                if (possibleToBuildA(a, n, length)) {
                                        arrayList.add(length);
                                }
                        }
                        arrayList.add(n);
                        out.println(arrayList.size());
                        arrayList.stream().forEach(e -> out.print(e + " "));
                }

                private boolean possibleToBuildA(int[] a, int n, int length) {
                        int a1 = a[0];
                        ArrayList<Integer> difference = new ArrayList<>();
                        for (int i = 1; i < length; i++) {
                                difference.add(a[i] - a[i - 1]);
                        }
                        for (int i = length; i < n; ) {
                                int j = 0;
                                for (; j < length && j + i < n; j++) {
                                        if (j == 0) {
                                                if (a[j + i] != (a1 + a[j + i - 1])) return false;
                                                else continue;
                                        } else {
                                                if ((a[j + i] - a[j + i - 1]) != difference.get(j - 1)) return false;
                                        }
                                }
                                i = i + j;
                        }
                        return true;
                }

        }

        static class InputReader {
                InputStream is;
                private byte[] inbuf = new byte[1024];
                public int lenbuf = 0;
                public int ptrbuf = 0;

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

                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++];
                }

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

                public int i() {
                        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();
                        }
                }

        }
}

