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

Solution (Python):
var1 = int(input()) + 1
list3 = []
for i in range(1, var1):
    list3.append(input())
for m in range(0, var1-1):
    str1 = list3[m]
    list1 = str1.split(" ")
    list1 = list(map(int, list1))
    var2 = max(list1)
    list1.remove(max(list1))
    var2 = var2 * var2
    var3 = list1[0]*list1[0]
    var4 = list1[1]*list1[1]
    if var4 + var3 == var2:
        print("YES")
    else:
        print("NO")
    list1.clear()
    str1 = None

Solution (Python):
n=int(input())
for i in range(n):
    x=list(map(float,input().split()))
    if x[0]**2+x[1]**2==x[2]**2:
        print("YES")
    elif x[1]**2+x[2]**2==x[0]**2:
        print("YES")
    elif x[2]**2+x[0]**2==x[1]**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
N = int(input())
for i in range(N):
    tri = list(map(int, input().split()))
    
    tri.sort()
    
    if tri[2]**2 == tri[0]**2 + tri[1]**2:
        print('YES')
    else:
        print('NO')

Solution (Python):
input_num = int(input())

for i in range(input_num):
    sides = list(map(int, input().split()))
    sides.sort()
    a, b, c = sides
    if a*a + b*b == c*c:
        print('YES')
    else:
        print('NO')

Solution (Python):
N=int(input())
for a,b,c in [[int(i) for i in input().split(" ")] for k in range(N)]:
    if b*b+c*c==a*a:
        print("YES")
    elif a*a+c*c==b*b:
        print("YES")
    elif a*a+b*b==c*c:
        print("YES")
    else:
        print("NO")

Solution (Python):
def judge_triangle(edges):
    edges.sort(reverse = True)
    if edges[0]**2 == edges[1]**2 + edges[2]**2:
        return 'YES'
    else:
        return 'NO'

lines = int(input())

for i in range(lines):
    edges = list(map(int, raw_input().split()))
    print judge_triangle(edges)

Solution (Python):


for n in range(int(input())):
    a,b,c = sorted(map(int,input().split()))
    if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
for i in range(int(input())):
    (a, b, c) = sorted(list(map(int, input().split())))
    if a**2+b**2 == c**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
for i in range(int(input())):
    a,b,c = sorted(list(map(int,input().split())))

    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Solution (Python):
for _ in range(int(input())):
    a,b,c = [int(x) for x in input().split()]
    print("YES" if a**2 == b**2 + c**2 or b**2 == a**2 + c**2 or c**2 == a**2 + b**2 else "NO")

Solution (Python):
h=int(input())
for i in range(0, h):
	n=list(map(int, input().split()))
	a=n[0]
	b=n[1]
	c=n[2]
	if a**2+b**2==c**2 or b**2+c**2==a**2 or c**2+a**2==b**2:
		print("YES")
	else:
		print("NO")

Solution (Python):
import sys

datasets = int(input())

for _ in range(datasets):
    data = list(map(int, input().strip().split(" ")))
    data.sort()
    if data[0]*data[0] + data[1]*data[1] == data[2]*data[2]:
        print("YES")
    else:
        print("NO")

Solution (Python):
n = int(input() )
for i in range(n):
    a, b, c = [int(x) for x in input().split()]
    if (b > a):
        a, b = b, a
    if (c > a):
        a, c = c, a 
    if (b*b + c*c - a*a == 0):
        print("YES")
    else:
        print("NO")

Solution (Python):
N=int(input())
triangle=[]

for i in range(N):
    triangle.append(list(map(int,input().split())))

for i in range(N):
    if pow(triangle[i][0],2)+pow(triangle[i][1],2)+pow(triangle[i][2],2)==2*pow(max(triangle[i]),2):
        print("YES")
    else:
        print("NO")

Solution (Python):
for i in range(int(input())):
    a, b, c = sorted([int(x) for x in input().split()])
    print('YES' if (a**2 + b**2 == c**2) else 'NO')

Solution (Python):
i = int(input())
for j in range(i):
    a,b,c = [int(i) for i in input().split()]
    if a**2+b**2==c**2 or abs(a**2-b**2)==c**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
n = int(input())
ans = []

for _ in range(n):

    l = list(map(int, input().split()))
    l.sort()
    a = l[0]
    b = l[1]
    c = l[2]

    if c**2 == a**2 + b**2:
        ans.append("YES")
    else:
        ans.append("NO")


for a in ans:
    print(a)

Solution (Python):
def Triangle(a,b,c):
    if a**2 == b**2 +c**2 or b**2 == a**2+c**2 or c**2 == a**2+b**2:
        print("YES")
    else:
        print("NO")

N = int(input())
for i in range(N):
    a,b,c = map(int,input().split())
    Triangle(a,b,c)

Solution (Python):
n=int(input())
for i in range(n):
	a=sorted(list(map(int,input().split())))
	if a[0]*a[0]+a[1]*a[1]==a[2]*a[2]:
		print('YES')
	else:
		print('NO')

Solution (Python):
n = int(input())
for _ in range(n):
    num = sorted(map(int, input().split()))
    if num[0]**2 + num[1]**2 == num[2]**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
def isRightTri(list):
    list.sort()
    if list[2]**2 == list[0]**2 + list[1]**2:
        return True
    else:
        return False

n = int(input())
ans = []
for i in range(n):
    a = list(map(int,input().split()))
    ans.append(isRightTri(a))
for i in range(n):
    if ans[i]:
        print("YES")
    else:
        print("NO")

Solution (Python):
import math

num = int(input())

for i in range(num):
    try:
        sides = list(map(int, input().split(" ")))
        sides.sort()

        if int(math.pow(sides[0], 2)) + int(math.pow(sides[1], 2)) == int(math.pow(sides[2], 2)):
            print("YES")
        else:
            print("NO")

    except:
        break

Solution (Python):
for _ in range(int(input())):
    a,b,c = sorted(list(map(int, input().split())))
    if c*c==a*a+b*b:
        print("YES")
    else :
        print("NO")

Solution (Python):
N = int(input())
ans = []

for i in range(N) :
    a, b, c = sorted(list(map(int, input().split())))
    if a ** 2 + b ** 2 == c ** 2 :
        ans.append("YES")
    else :
        ans.append("NO")
        
for a in ans :
    print(a)

Solution (Python):
s = int(input())

for i in range(s):
  xs = map(int, input().split())
  xs = [x*x for x in xs]
  
  if xs[0]+xs[2] == xs[1] or xs[1]+xs[0] == xs[2] or xs[2]+xs[1]==xs[0]:
    print('YES')
  else:
    print('NO')

Solution (Python):
n = int(input())
ans = []
for i in range(n):
    a, b, c = map(int, (input()).split(" "))
    if 2*max(a, b, c)**2 == a**2+b**2+c**2:
        ans.append("YES")
    else:
        ans.append("NO")
for i in ans:
    print(i)

Solution (Python):
n=input()

for _ in range(n):
 a=sorted(map(int, raw_input().split()))
 print 'YES' if a[0]**2+a[1]**2==a[2]**2 else 'NO'

Solution (Python):
N = int(input())
for i in range(0, N):
    edge = list(map(int, input().split()))
    edge.sort()
    edge = list(map(lambda n:n*n, edge))
        
    if (edge[2] == edge[0] + edge[1]):
        print("YES")
    else:
        print("NO")

Solution (Python):
n = int(input())
for _ in range(n):
	tr = list(map(int, input().split()))
	c = max(tr)
	tr.remove(c)
	wa = sum(map((lambda x: x**2), tr))
	if c**2 == wa: print('YES')
	else: print('NO')

Solution (Python):
num = int(input())
output = []
data = []

for x in range(num):
    data = input().split()
    for y in range(len(data)):
        data[y] = int(data[y])
    data.sort()
    if data[2]**2 == data[1]**2 + data[0]**2:
        output.append("YES")
    else:
        output.append("NO")

for x in range(num):
    print(output[x])

Solution (Python):
time = input()
judge = [''] * 1000

for i in range(time):
	data = map(int, raw_input().split())
	[a, b, c] = sorted(data)
	if a ** 2 + b ** 2 == c ** 2:
		judge[i] = 'YES'
	else:
		judge[i] = 'NO'
	
for j in range(i+1):
	print judge[j]