401732: GYM100519 D Do it Right!
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
D. Do it Right!time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output
Given two distinct positive integers A and B, find out if it is possible to find a third positive integer C so that a triangle with the sides A, B and C is a right triangle. Remember that a triangle is called a right triangle if one of its angles equals to 90 degrees.
InputThe first line of input contains two positive integers A and B: the lengths of the two given sides (1 ≤ A < B ≤ 100).
OutputOutput "YES" if it is possible to find such an integer C, or "NO" otherwise.
ExamplesInput3 4Output
YESInput
1 2Output
NONote
- In the first example, we can take C = 5.
- In the second example, it is impossible to find an integer C with the required property.