#P8828. [传智杯 #3 练习赛] 直角三角形

[传智杯 #3 练习赛] 直角三角形

Problem Description

The two legs of a right triangle are a,b(ab)a, b (a \le b), its hypotenuse is cc, and a,b,ca, b, c are all positive integers.

Now we already know the hypotenuse length cc. What are the lengths of the two legs of this right triangle?

Input Format

Input one integer c(1c1.41×104)c (1 \le c \le 1.41 \times 10^4).

Output Format

Output two integers a,ba, b as the answer. It is guaranteed that an integer solution exists. If there are multiple possible answers, make sure aa is as small as possible.

5
3 4

Hint

Translated by ChatGPT 5