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.
def recover(xs):
	arr = [None] * len(xs)
	prev = 0
	for i, x in enumerate(xs):
		arr[i] = x - prev
		prev = x
	return arr

def has_cycle(xs, k):
	for i in range(k, len(xs)):
		if xs[i] != xs[i % k]:
			return False
	return True

def min_cycle(xs):
	for i in range(1, len(xs)):
		if has_cycle(xs, i):
			return i
	return len(xs)

def solve(xs):
	n = len(xs)
	arr = recover(xs)
	k = min_cycle(arr)
	solution = set(list(range(k, n, k)) + [n])
	
	for i in range(k + 1, len(xs)):
		if i not in solution and has_cycle(arr, i):
			solution.add(i)

	return sorted(list(solution))

n = int(input())
xs = list(map(int, input().split()))[:n]
solution = solve(xs)
print(len(solution))
for x in solution:
	print(x, end=" ")
print()

# assert recover([1,2,3,4,5]) == [1,1,1,1,1]
# assert recover([1,5,3]) == [1,4,-2]

# assert has_cycle([1,1,1], 1) == True
# assert has_cycle([1,1,1], 2) == True
# assert has_cycle([1,1,1], 3) == True
# assert has_cycle([1,2,1], 2) == True
# assert has_cycle([1,2,1], 1) == False
# assert has_cycle([1,2,1], 3) == True
# assert has_cycle([1,2,3], 1) == False
# assert has_cycle([1,2,3], 2) == False
# assert has_cycle([1,2,3,1,2], 3) == True

# assert min_cycle([1,2,3,1,2]) == 3
# assert min_cycle([1,2,3,4,1]) == 4
# assert min_cycle([1,2,3,4]) == 4
# assert min_cycle([1,1,1,1]) == 1
# assert min_cycle([10,9,8,10,9,8,10,9]) == 3

# assert solve([1,2,3,4,5]) == [1,2,3,4,5]
# assert solve([1,3,5,6,8]) == [3,5]
# assert solve([1,3,5,7,9]) == [5]
# assert solve([1,3,6,7,9]) == [3,5]
# assert solve([1,5,3]) == [3]
# assert solve([1,5,6]) == [2,3]
# assert solve([1,5,6]) == [2,3]
# assert solve([1]) == [1]
# assert solve([100]) == [1]
# assert solve([1,2,3]) == [1,2,3]
# assert solve([1,2,3]) == [1,2,3]
# assert solve([10,5,5,15,10]) == [3,5]
# assert solve([10,5,5,15,10,10]) == [3,6]
# assert solve([10,5,5,15,10,10,20,15,15]) == [3,6,9]
# assert solve([1000] * 1000) == [1000]
# assert solve(list(range(1, 1000 + 1))) == list(range(1, 1000 + 1))
# assert solve(list(range(1, 1000 + 1))) == list(range(1, 1000 + 1))
# assert solve([1,1,2,2,3,3,4,4,5,5,6,6,7,7,8]) == [2,4,6,8,10,12,14,15]
# assert solve([1,2,5,6,7]) == [3,4,5]