#C13808. Right-Angled Triangle Verification
Right-Angled Triangle Verification
Right-Angled Triangle Verification
Given three positive integers representing the lengths of the sides of a potential triangle, determine if these sides can form a right-angled triangle.
A triangle is right-angled if, when its sides are sorted in non-decreasing order as \(a\), \(b\), and \(c\), the following condition holds:
$$a^2 + b^2 = c^2$$
Read the input from standard input and output the result to standard output.
inputFormat
Input is given from standard input (stdin) in a single line containing three positive integers separated by spaces, representing the side lengths.
outputFormat
If the sides form a right-angled triangle, print YES
to the standard output. Otherwise, print NO
.
3 4 5
YES