AT_abc444_c [ABC444C] AtCoder Riko
Description
You are given a sequence of $ N $ positive integers $ A=(A_1,A_2,\dots,A_N) $ .
Find all positive integers $ L $ for which the following can occur:
> AtCoder Inc. has released a stick-shaped snack called "AtCoderiko." A cup contains one or more AtCoderikos, each of length $ L $ . When Takahashi shook the cup, each AtCoderiko ended up in one of the following states:
>
> - It remained as one AtCoderiko of length $ L $ .
> - It broke into two AtCoderikos whose lengths sum to $ L $ . Here, the length of each AtCoderiko is a positive integer.
>
> After shaking the cup, there were $ N $ AtCoderikos in the cup, and the length of the $ i $ -th AtCoderiko was $ A_i $ .
The given input guarantees that there exists at least one positive integer $ L $ for which this can occur.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $
Output Format
Output all values of $ L $ satisfying the condition in ascending order, separated by spaces, in one line.
Explanation/Hint
### Sample Explanation 1
If the cup initially contained three AtCoderikos of length $ 10 $ , and one of them broke into two AtCoderikos of length $ 5 $ , the condition is satisfied.
If the cup initially contained two AtCoderikos of length $ 15 $ , and each of them broke into two AtCoderikos of lengths $ 5 $ and $ 10 $ , the condition is satisfied.
No other values of $ L $ satisfy the condition.
### Constraints
- $ 1 \leq N \leq 3 \times 10^5 $
- $ 1 \leq A_i \leq 10^9 $
- There exists at least one $ L $ satisfying the condition.
- All input values are integers.