Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/funksiya-togri-burchakli-uchburchak

Right triangle

Easy 1000 ms 128 MB 23%
Share

Write a function IsRightTriangle(a, b, c) that returns true if a right triangle with sides $a$, $b$ and $c$ exists and false otherwise. For that, the square of the longest side must equal the sum of the squares of the other two sides.

Example 1: IsRightTriangle(3, 4, 5) → true — $3^{2} + 4^{2} = 5^{2}$.

Example 2: IsRightTriangle(2, 3, 4) → false — $2^{2} + 3^{2} \ne 4^{2}$.

Write only the function body.

The three sides of a triangle go into the function IsRightTriangle, which returns true or false

Input

One line with three positive integers $a$, $b$ and $c$ — the arguments of the function.

Output

The value returned by the function: true or false.

Note

$1 \le a, b, c \le 10^{6}$

Examples

Input #1
3 4 5
Output #1
true
Input #2
2 3 4
Output #2
false

Sign in to submit a solution

Signing up is free and takes a minute.