Hide

Problem F
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 n104.

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
Hide

Please log in to submit a solution to this problem

Log in