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.
"""
What I cannot create, I do not understand.

https://github.com/Cheran-Senthil/PyRival
Copyright (c) 2018 Cheran Senthilkumar
"""
from __future__ import division, print_function

import cmath
import itertools
import math
import operator as op
import sys
from bisect import bisect_left, bisect_right
from string import ascii_lowercase, ascii_uppercase

# import random
# from collections import Counter, MutableSequence, defaultdict, deque
# from copy import deepcopy
# from decimal import Decimal
# from difflib import SequenceMatcher
# from heapq import heappop, heappush


if sys.version_info[0] < 3:
    # from fractions import Fraction
    # from fractions import gcd
    # from cPickle import dumps
    # from Queue import PriorityQueue, Queue
    pass
else:
    # from functools import reduce
    # from fractions import Fraction
    # from math import gcd
    # from pickle import dumps
    # from queue import PriorityQueue, Queue
    pass


if sys.version_info[0] < 3:
    class dict(dict):
        def items(self):
            return dict.iteritems(self)

        def keys(self):
            return dict.iterkeys(self)

        def values(self):
            return dict.itervalues(self)

    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip


def sync_with_stdio(sync=True):
    """
    Sets whether the standard Python streams are allowed to buffer their I/O.

    Parameters
    ----------
    sync : bool
        the new synchronization setting

    """
    global input, flush

    if sync:
        flush = sys.stdout.flush
    else:
        from atexit import register

        if sys.version_info[0] < 3:
            from io import BytesIO

            input = iter(sys.stdin.read().splitlines()).next
            sys.stdout = BytesIO()
        else:
            from io import StringIO

            input = iter(sys.stdin.read().splitlines()).__next__
            sys.stdout = StringIO()

        register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))


def main():
    n = int(input())
    a = [0] + list(map(int, input().split(' ')))
    diff_a = [0] * (len(a) - 1)
    for i in range(len(a) - 1):
        diff_a[i] = a[i + 1] - a[i]

    cand = []
    for ind, val in enumerate(diff_a):
        if val == diff_a[0]:
            cand.append(ind)


    res = []
    for i in cand[1:]:
        flag = False
        for j in range(i, len(diff_a)):
            if diff_a[j - i] != diff_a[j]:
                flag = True
                break
        if not flag:
            res.append(str(i))

    print(len(res) + 1)
    print(' '.join(res + [str(n)]))



if __name__ == '__main__':
    sys.setrecursionlimit(10000)
    sync_with_stdio()
    main()
