#45Easy
When the sum crosses a threshold
Time: 1 s · Memory: 256 MB
- Loops
Statement
You are given a natural number . Find the smallest natural such that . Print and the sum at that moment.
Input format
A single integer ().
Output format
A single line with two integers: and .
Examples
Input
10
Output
4 10
Input
11
Output
5 15
Note
The number of steps is not known in advance — use a while loop: while the sum is less than , add the next number. In the first example , so the answer is 4 10; in the second and the sum is .
The sum exceeds — you need long long / int64.
