Problem D
Any Pythagorean Triple
Languages
en
is
You are given a circumference $n$ and want to find a right-angled triangle with integer side lengths that has a right angle and this circumference. No side can have length $0$, nor a negative length.
Input
The first and only line of input contains a positive integer $n \leq 10^4$.
Output
Print three positive integers $a, b, c$ separated by spaces. Here $a, b$ should be the lengths of the shorter sides and $c$ the length of the hypotenuse. The sum of the numbers must be $n$ and the triangle must form a right angle. If no solution exists, print three zeros instead.
Sample Input 1 | Sample Output 1 |
---|---|
1000 |
200 375 425 |