

Sonya Wants More Equal NumbersPussycat Sonya has an array A consisting of N integers. She can replace some adjacent elements A_{i} and A_{i + 1} with their sum. Sonya can perform this operation any number of times she wants. What is the maximum number of equal elements Sonya can get, and what can be the possible values of these equal elements? Input SpecificationThe first line of the input contains one integer N, the number of elements in array A (1 ≤ N ≤ 100). The second line contains N spaceseparated positive integers, the elements of array A (1 ≤ A_{i} ≤ 1000). Output SpecificationIn the first line, print the maximum number of equal elements Sonya can get. In the second line, print all the possible values of these equal elements in ascending order, separated by a space. Sample Input
Output for Sample Input
Sample ExplanationIn this case, the maximum number of equal elements Sonya can get is 2. Now let's see the possible values of these equal elements:


University of Debrecen; Faculty of Informatics; v. 05/24/2018 