AT_abc420_g [ABC420G] sqrt(n²+n+X)
Description
You are given an integer $ X $ .
Find all integers $ n $ such that $ \displaystyle \sqrt{n^2+n+X} $ is an integer.
Input Format
The input is given from Standard Input in the following format:
> $ X $
Output Format
Let $ N_1,N_2,\ldots,N_K $ be the integers $ n $ such that $ \displaystyle \sqrt{n^2+n+X} $ is an integer, listed in ascending order (where $ K $ is the number of $ n $ satisfying the condition). Output in the following format:
> $ K $ $ N_1 $ $ N_2 $ $ \ldots $ $ N_K $
Explanation/Hint
### Sample Explanation 1
There are four integers $ n $ such that $ \sqrt{n^2+n+4} $ is an integer: $ n=-4,-1,0,3 $ .
### Constraints
- $ -10^{14} \le X\le 10^{14} $
- The input value is an integer.