Problem:


Is it a Right Triangle?

Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.

Input

Input consists of several data sets. In the first line, the number of data set, N is given. Then, N lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.

Constraints

 1 ≤ length of the side ≤ 1,000

 N ≤ 1,000

Output

For each data set, print "YES" or "NO".

Sample Input

3
4 3 5
4 3 6
8 8 8

Output for the Sample Input

YES
NO
NO



Sample input:
3
4 3 5
4 3 6
8 8 8


Sample output:
YES
NO
NO

Submission status: Runtime Error

Solution code:
N=int(input())
while 1:
    a,b,c=map(int,input().split())
    A=a**2
    B=b**2
    C=c**2       
    if A+B==C:
        print('YES')
    elif A+C==B:
        print('YES')
    elif B+C==A:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
N=int(input())
while 1:
    a,b,c=map(int,input().split())
    A=a**2
    B=b**2
    C=c**2
    for i in len(N):
        if A+B==C:
            print('YES')
        elif A+C==B:
            print('YES')
        elif B+C==A:
            print('YES')
        else:
            print('NO')

Submission status: Runtime Error

Solution code:
while True:
    try:
        input_line = input()
        if input_line == '':
            break
        else:
            nums = list(map(int, input_line.split()))
            max_num = max(nums)
            nums.remove(max_num)
            if max_num**2 == nums[0]**2 + nums[1]**2:
                print("YES")
            else:
                print("NO")
    except EOFError:
        break

Submission status: Runtime Error

Solution code:
import sys

a = ""
for input in sys.stdin:
    a += input
l = a.split()
for i in range(0,len(l),3):
    if((int(l[i]) * int(l[i]) + int(l[i+1]) * int(l[i+1])) == (int(l[i+2]) * int(l[i+2]))):
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
if a**2 + b**2 == c**2:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
a, b, c = sorted(map(int, input().split()))
if a**2 + b**2 == c**2:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
for e in sys.stdin:
    a, b, c = sorted(map(int, e.split()))
    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
import sys
for e in sys.stdin:
    a, b, c = sorted(map(int, e.split()))
    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
import sys
for e in int().input():
    a, b, c = sorted(int(sys.stdin.split()))
    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
import sys
input()
for e in sys.stdin:
    a, b, c = sorted(int(e.split()))
    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
import sys
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin):
 print(['NO','YES'][a*a+b*b==c*c])

Submission status: Runtime Error

Solution code:
import sys
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin.readlines()):
 print(['NO','YES'][a*a+b*b==c*c])

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(n):
	li  = sorted(input().split())
	if(li[0] ** 2 + li[1] ** 2 == li[3] ** 2):
		print('YES')
	elif:
		print('NO')

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    for i in range(n):
        a, b, c=(int(input().split()))
        if a+b<=c or a+c<=b or b+c<=a:
            print("YES")
        else:
            print("NO")
            
main()

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    n.sort()
    if n[0]**2+n[1]**2 != n[2]**2:
        print("NO")
    else:
        print("YES")

main()

Submission status: Runtime Error

Solution code:
[print(s) for s in map(lambda x:x[0]+x[1]==x[2]　and 'YES' or 'NO', [sorted(int(x)**2 for x in input().split(' ') for i in range(int(input()))])]

Submission status: Runtime Error

Solution code:
[print(s) for s in map(lambda x:x[0]+x[1]==x[2]　and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ') for i in range(int(raw_input()))])]

Submission status: Runtime Error

Solution code:
[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])]

Submission status: Runtime Error

Solution code:
a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO', [sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])]

Submission status: Runtime Error

Solution code:
a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO',[sorted(int(x)**2 for x in input().split(' ')) for i in range(int(input()))])]

Submission status: Runtime Error

Solution code:
x = int(input())
for a in range(x):
 y = map(int,raw_input(),split())
  sort(y[3])


if y[2]**2-y[1]**2 == y[0]**2:
  print "YES"
else:
  print "NO"

Submission status: Runtime Error

Solution code:
for i in range(int(raw_input())):
    n = [int(x) for x in raw_input().split()]
    n.sort(reverse=True)
    if n[0]**2 == n[1]**2 + n[2]**2:
        print "

Submission status: Runtime Error

Solution code:
for i in range(int(raw_input())):
&#160;&#160;&#160;&#160;sides = map(int, raw_input().split())
&#160;&#160;&#160;&#160;if sides[0]**2 == sides[1]**2 + sides[2]**2 or\
&#160;&#160;&#160;&#160;&#160;&#160;&#160;sides[1]**2 == sides[2]**2 + sides[0]**2 or\
&#160;&#160;&#160;&#160;&#160;&#160;&#160;sides[2]**2 == sides[0]**2 + sides[1]**2:
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;print "YES"
&#160;&#160;&#160;&#160;else:
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;print "NO"

Submission status: Runtime Error

Solution code:
import sys
for x in sys.stdin.readlines():
    l = map(int,x.split())
    l.sort()
    a,b,c = l
    if c**2 == a**2 + b**2 :
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
import sys
for x in sys.stdin.readlines():
    l = map(int,x.split())
    l.sort()
    n,a,b,c = l
    if c**2 == a**2 + b**2 :
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
import sys
for x in sys.stdin.readlines():
    l = map(int,x.split())
    l.remove(l[0])
    a,b,c = l
    if c**2 == a**2 + b**2 :
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
a = int(input())
b = 1
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if a*2 + b*2 = c*2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Submission status: Runtime Error

Solution code:
a = int(input())
b = 1
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if x[0]*2 + x[1]*2 = x[2]*2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(1)
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if x[0]**2 + x[1]**2 = x[2]**2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(1)
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if x[0]**2 + x[1]**2 == x[2]**2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Submission status: Runtime Error

Solution code:
n=input()

for i in range(n):
     x=[input(),input(),input()]
     x.sort()
     if x[0]**2+x[1]**2==x[2]**2: print("YES")
     else: print("NO")

Submission status: Runtime Error

Solution code:
while True:
	try:
		list = [int(item) for item in raw_input().split()]
		list.sort()
		if list[0] ** 2 + list[1] ** 2 == list[2] ** 2 :
			print 'YES'
		else :
			print 'NO'
	except EOFError:
		break

Submission status: Runtime Error

Solution code:
import sys

for lineCnt, line in enumerate(sys.stdin):
    if lineCount == 0: continue
    a, b, c = map(int, line.rstrip('\n').split(' '))
    if a+b>c and b+c>a and c+a>b:
        print 'YES'
    else:
        print 'NO'

Submission status: Runtime Error

Solution code:
import sys

for lineCount, line in enumerate(sys.stdin):
    if lineCount == 0:
        continue
    a, b, c = sorted(map(int, line.split(' ')))
    if a**2 + b**2 = c**2:
        print 'YES'
    else:
        print 'NO'

Submission status: Runtime Error

Solution code:
a = int,raw_input()
for i in range(0,a):
	x, y, z = map(int,raw_input().split())
	if(x > y > z or x > z > y and x*x == y*y + z*z):
		print 'YES'
	elif(y > x > z or y > z > x and y*y == x*x + z*z):
		print 'YES'
	elif(z > x > y or z > y > z and z*z == x*x + y*y):
		print 'YES'
	else:
		print 'NO'

Submission status: Runtime Error

Solution code:
timel = int(raw_input())
for gomi in xrange(timel):
 a,b,c = map(lambda x: int(x)**2, raw_input().split())
 if a+b==c or b+c==a or c+a==b:
  print "YES"
 else
  print "NO"

Submission status: Runtime Error

Solution code:
for n in range(input()):
  a,b,c=sorted(map(int,raw_input().split()))
  print ["YES","NO"][c*c-a*a-b*b]

Submission status: Runtime Error

Solution code:
while True:
    try:
        line = input()
    except:
        break
    a, b, c = map(int, line.strip().split())
    print('YES' if a**2 + b**2 == c**2 else 'NO')

Submission status: Runtime Error

Solution code:
n = input()
for i in range(n):
    a, b, c = map(int, input().strip().split())
    print('YES' if a**2 + b**2 == c**2 else 'NO')

Submission status: Runtime Error

Solution code:
list=[a,b,c]

list.sort()

A=list[0]
B=list[1]
C=list[2]

if C**2==A**2+B**2:
    print "YES"
else :
    print "NO"

Submission status: WA: Presentation Error

Solution code:
import sys

n = int(input())
l = sys.stdin.readlines()
s = ""
for i in l:
  x, y, z = sorted(map(lambda x:x*x,map(int, i.split())))
  if x + y == z:
      s += "YES\n"
  else:
      s += "NO\n"

print(s)