BlackBox - 1
Practice
3.4 (7 votes)
Mathematics
Open
Approved
Easy
Mathamatics
Problem
30% Success 11463 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Paul was the most famous character in Tekken-3. Of course he went to college and stuff. In one of the exams he wasn't able to answer a question which asked to check if a tuple of 3 non negative integers constituted a Primitive Pythagorian Triplet or not. Paul was not able to answer it correctly and henceforth, he could not concentrate on any fight for a very long time and lost most of them. So, he decided to learn everything about Primitive Pythagorian Triplets.

Now, Paul seeks your help to determine whether a given triplet is a Primitive Pythagorian Triplet or not.

INPUT :

The first line of the input contains the number of test cases T. Every test case has a single line containing 3 space separated integers a,b and c.

OUTPUT :

The output to each test case is a "YES" or a "NO".

CONSTRAINTS :

1<=T<=100000

0<=a,b,c<=10000000

NOTE:
A primitive Pythagorean triple is one in which a, b and c are coprime.

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
2 votes
Tags:
Maths
Points:20
15 votes
Tags:
Ad-HocBasic ProgrammingOpenApprovedEasyMathamatics
Points:20
432 votes
Tags:
Ad-HocEasyMath