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):

import sys
import re


def judge(a, b, c):
    if a ** 2 + b ** 2 == c ** 2:
        return "YES"
    else:
        return "NO"




lis = sys.stdin.readlines()
lis.pop(0)

for line in lis:
    edges = map((lambda x: int(x)), re.split(" +", line))
    edges.sort()
    r = judge(edges[0], edges[1], edges[2])
    print r

Solution (Python):
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
	except IndexError:
		continue

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

Solution (Python):
n = int(raw_input())
for x in range(n) :
  edges = map(int, raw_input().split())
  a = min(edges); edges.remove(a)
  b = min(edges); edges.remove(b)
  c = edges[0]

  if a**2 + b**2 == c**2 :
    print "YES"
  else :
    print "NO"

Solution (Python):


if __name__ == '__main__':

	N = int(raw_input())

	for i in range(0,N):

		a, b, c = raw_input().split()
		triangle = [int(a),int(b),int(c)]
		triangle.sort()
		
		if(triangle[2]**2 == triangle[0]**2 + triangle[1]**2):
			print 'YES'
		else :
			print 'NO'

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

Solution (Python):
for i in range(input()):
    q,w,e=sorted(map(int,raw_input().split()))
    print "YES" if q**2+w**2==e**2 else "NO"

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

Solution (Python):


for i in range(input()):
	num = map(int, raw_input().split(" "))
	num.sort()
	
	if num[0]**2+num[1]**2 == num[2]**2:
		print "YES"
	else:
		print "NO"

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

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

Solution (Python):
n = int(raw_input())

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

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

Solution (Python):


import sys

N = 0
datas = []

for (i, line) in enumerate(sys.stdin):
	if i == 0:
		N = int(line)
	else:
		datas.append([int(line.split()[0]), int(line.split()[1]), int(line.split()[2])])

for data in datas:
	index = data.index(max(data))
	x = data[index] * data[index]
	y = 0
	for i in [0, 1, 2]:
		if index == i:
			continue
		else:
			y += data[i] * data[i]
	if x == y:
		print "YES"
	else:
		print "NO"

Solution (Python):
n = input()
for x in range(n):
        l = map(int,raw_input().split())
        lmax = max(l)
        l.remove(lmax)
        if l[0]**2 + l[1]**2 == lmax**2:
                print("YES")
        else:
                print("NO")

Solution (Python):
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'

Solution (Python):


iiart = lambda x,y,z: "YES" if (z**2 == x**2+y**2) else "NO"

if __name__ == "__main__":
    for i in range(int(raw_input())):
        print "%s" % (iiart(*sorted([int(x) for x in raw_input().split()])))

Solution (Python):
for i in xrange(input()):
	i,j,k = sorted([int(i) for i in raw_input().split()])
	print "YES" if i**2 + j**2 == k**2 else "NO"

Solution (Python):
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"

Solution (Python):
n = input()
a = []
for i in range(n):
    t = map(int, raw_input().split())
    t.sort()
    if t[2] ** 2 == t[0] ** 2 + t[1] ** 2:
        a.append("YES")
    else:
        a.append("NO")
for j in a:
    print(j)

Solution (Python):
n=input()
while n:
    n-=1
    a,b,c=sorted(map(int,raw_input().split()))
    print "YES" if a*a+b*b==c*c else "NO"

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

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

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

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

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

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

Solution (Python):


import sys

for line in sys.stdin.readlines():
    List = map(int, line.strip().split())
    if len(List) == 1: continue
    List.sort()
    if(List[2]**2 == List[0]**2 + List[1]**2):
        print "YES"
    else:
        print "NO"

Solution (Python):
import math
n = int(raw_input())

for i in range(n):
    a = map(int, raw_input().split())
    a.sort()
    c = math.sqrt(a[0]**2+a[1]**2)
    if c == a[2]:
        print "YES"
    else:
        print "NO"

Solution (Python):
N = int(raw_input())
for i in range(N):
  a,b,c = sorted(map(int, raw_input().split()))
  print (a**2 + b**2 == c**2 and 'YES') or 'NO'

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

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

Solution (Python):
for i in range(input()):

    ary = map(int,raw_input().split())
    c = max(ary)
    ary.remove(c)
    a,b = ary

    if a**2 + b**2 == c**2:
        print "YES"
    else:
        print "NO"

Solution (Python):
n = int(raw_input())
for i 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):
for n in range(input()):
  a,b,c=sorted(map(int,raw_input().split()))
  print ["NO","YES"][c*c-a*a-b*b==0]

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

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

Solution (Python):
import sys

n = input()

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

Solution (Python):
n = int(raw_input())

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

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

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

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

Solution (Python):

def tr(a,b,c):
	l = a*a
	m = b*b
	n = c*c
	if(l+m==n or m+n==l or l+n==m):
		print "YES"
	else:
		print "NO"
for i in range(int(raw_input())):
	(l,m,n) = map(int,raw_input().split())
	tr(l,m,n)

Solution (Python):
def triangle(a, b, c):
    return a * a + b * b == c * c

t = int(input())
for i in range(t):
    sides = input().split(' ')
    for i in range(3):
        sides[i] = int(sides[i])
    sides.sort()
    r = triangle(sides[0], sides[1], sides[2])
    if (r): print("YES")
    else: print("NO")

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

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

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

Solution (Python):
N=int(input())
i=0
while i<N:
    a,b,c=map(int,input().split())
    if a*a==b*b+c*c or b*b==c*c+a*a or c*c==a*a+b*b:
        print('YES')
    else:
        print('NO')
    i+=1

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

for i in range(1,N+1) :
    x,y,z = map(int,input().split())
    X=max(x,y,z)
    Y=min(x,y,z)
    Z=x+y+z-X-Y
    if X**2==Y**2+Z**2:
        print("YES")
    else :
        print("NO")

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

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

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

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

    m = L.pop(L.index(max(L)))
    d = L[0] ** 2 + L[1] ** 2

    if m ** 2 ==d:  
        print("YES")
    else:
        print("NO")

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

for i in range(a):
    x,y,z=map(int,input().split())
    
    if x>y:
        x,y=y,x
    if y>z:
        y,z=z,y
    if x>y:
        x,y=y,x
    
    if z**2==x**2+y**2:
        print("YES")
    else:
        print("NO")

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

Solution (Python):
def triangle(dataset):
    a, b, c = dataset
    if a*a + b*b == c*c:
        return 1
    return 0

N = int(input())
for _ in range(N):
    dataset = sorted(map(int, input().split()))
    flag = triangle(dataset)
    print(["NO", "YES"][flag])

Solution (Python):
N = int(input())
for i in range(N):
    a,b,c = map(int, input().split())
    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):
def triangle(dataset):
    a, b, c = dataset
    if a*a + b*b == c*c:
        return 1
    return 0

N = int(input())
for _ in range(N):
    dataset = sorted(map(int, input().split()))
    flag = triangle(dataset)
    print(["NO", "YES"][flag])

Solution (Python):
t = int(input())
i = 0
def Right_Tri(m,n,o):
    a = (n**2+o**2)**(0.5)
    if m == a:
        return True

while(i<t):
    m,n,o = map(int, input().split())
    if (Right_Tri(m,n,o) or Right_Tri(n,o,m) or Right_Tri(o,m,n) == True):
        print("YES")
    else:
        print("NO")
    i += 1

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

for i in range (N):
    A,B,C = map(int,input().split())
    if A>B>=C:
        if A**2==B**2+C**2:
            print("YES")
        else:
            print("NO")
    elif A>C>=B:
            if A**2==C**2+B**2:
                print("YES")
            else:
                print("NO")
    elif B>A>=C:
        if B**2==A**2+C**2:
            print("YES")
        else:
            print("NO")
    elif B>C>=A:
        if B**2==A**2+C**2:
            print("YES")
        else:
            print("NO")
    elif C>A>=B:
        if C**2==A**2+B**2:
            print("YES")
        else:
            print("NO")
    else:
        if C**2==B**2+A**2:
            print("YES")
        else:
            print("NO")

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

Solution (Python):
N = int(input())
i = 0
while True:
    a = list((int(x)for x in input().split()))
    a.sort()
    i += 1
    if a[0]**2 + a[1]**2 == a[2]** 2:
        print("YES")
    else:
        print("NO")
    if i == N:
        break

Solution (Python):


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

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

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

for _ in range(x):
    a,b,c=map(int,input().split())
    if a**2 + b**2 == c**2:
        print('YES')
    elif b**2 + c**2 == a**2:
        print('YES')
    elif c**2 + a**2 == b**2:
        print('YES')
    else:
        print('NO')

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

i = 0

while True:
    a = list((int(x) for x in input().split()))
    a.sort()

    i += 1

    if a[0] ** 2 + a[1] ** 2 == a[2] ** 2:
        print("YES")
    else:
        print("NO")

    if i == N:
        break

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

Solution (Python):
N = int(input())
for i in range(N):
    x,y,z = map(int,input().split())
    a = [x,y,z]
    x,y,z = sorted(a)
    if x**2 + y**2 == z**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
i=int(input())
for j in range(i):
    a,b,c=map(int,input().split())
    d=[a,b,c]
    list=sorted(d)
    x=int(list[0])
    y=int(list[1])
    z=int(list[2])
    if x**2+y**2==z**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
N=int(input())
i=0
while i<N:
    a,b,c=map(int,input().split())
    if a*a==b*b+c*c or b*b==c*c+a*a or c*c==a*a+b*b:
        print('YES')
    else:
        print('NO')
    i+=1

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

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

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

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

for i in range(n):

    a,b,c = map(int,input().split())
    d=[a,b,c]
    d=sorted(d)

    if d[0]**2+d[1]**2==d[2]**2:
        print("YES")
    else:
        print("NO")

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

Solution (Python):
N = int(input())
for i in range(N) :
    a, b, c = map(int, input().split())
    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):
n=int(input())
for i in range(n):
    A,B,C=map(int,input().split())
    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')

Solution (Python):
n=int(input())
for i in range (n):
    l=list(map(int,input().split()))
    L=sorted(l)

    if (L[0])*(L[0])+(L[1])*(L[1])==(L[2])*(L[2]):
        print("YES")
        
    else:
        print("NO")

Solution (Python):
N=int(input())
for i in range(N):

    a,b,c=map(int,input().split())
    
    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")

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

Solution (Python):
N = int(input())
for i in range(N):
    a,b,c = map(int,input().split())
    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')

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

Solution (Python):
N = input()

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

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

Solution (Python):



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

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


for i in range(N):
    a,b,c=map(int,input().split())
    A=max(a,max(b,c))
    B=min(a,min(b,c))
    C=a+b+c-A-B
    
    if B**2+C**2==A**2:
        print('YES')
    else:
        print('NO')

Solution (Python):
N=int(input())
for i in range(N):
    x,y,z=sorted(map(int,input().split()))
    if x**2+y**2==z**2:
        print("YES")
    else:
        print("NO")

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

Solution (Python):
N=int(input())
for i in range(N):
    x,y,z=map(int,input().split())
    if x**2==y**2+z**2:
        print('YES')
    elif y**2==x**2+z**2:
        print('YES')
    elif z**2==x**2+y**2:
        print('YES')
    else:
        print('NO')

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

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

Solution (Python):
N = int(input())
for i in range(N) :
    a, b, c = map(int, input().split())
    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):
n = int(input())
for i in range(n):
    a, b, c  = map(int, input().split())
    d = 2
    e = 1/2
    
    if (a**d+b**d)**e == c or (a**d+c**d)**e == b or (c**d+b**d)**e == a:
        print('YES')
        
    else:
        print('NO')

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

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

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

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

Solution (Python):
N=int(input())
for i in range (1,N+1):
    a,b,c=map(int,input().split())
    x=max(a,b,c)
    y=min(a,b,c)
    z=a+b+c-x-y
    if x**2==y**2+z**2:
        print("YES")
    else:
        print("NO")

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

Solution (Python):
import math as m
N=int(input())
for i in range(N):
    a,b,c=map(int,input().split())
    A = min(a,min(b,c))
    C = max(a,max(b,c))
    B = a+b+c-A-C
    r=m.sqrt(A**2+B**2)
    if C == r:
        print("YES")
    else:
        print("NO")

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

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

Solution (Python):

n = int(input())
for a in range(n):
  x,y,z = (input().split())
  x = int(x)
  y = int(y)
  z = int(z)
  for a in range (3):
    if x > y:
      x,y = y,x
    if y > z:
      y,z = z,y
  if z**2 == x**2+y**2:
    print("YES")
  else:
    print("NO")

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

Solution (Python):
N=int(input())
for i in range(N):
    a,b,c=map(int,input().split())
    if a>b:
        a,b=b,a
    if b>c:
        b,c=c,b
    if a>b:
        a,b=b,a
    if c**2-a**2-b**2==0:
        print("YES")
    else:
        print("NO")

Solution (Python):
N=int(input())
for i in range(N):
    a,b,c=input().split()
    a=int(a)
    b=int(b)
    c=int(c)
    
    X=int(max(a,b,c))
    Y=int(min(a,b,c))
    Z=int(a+b+c-X-Y)
    
    if X**2 == Y**2 + Z**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
N = int(input())
for i in range(N):
    p = input()
    li = sorted([int(i) for i in p.split(" ")])
    if li[-1]**2 == li[-2]**2 + li[-3]**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
N=int(input())
for i in range(N):
    x,y,z=map(int,input().split())
    if x**2+y**2==z**2:
        print("YES")
    elif x**2+z**2==y**2:
        print("YES")
    elif y**2+z**2==x**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
for i in range(int(input())):
    x,y,z = sorted(list(map(int, input().split())))
    if x**2 + y**2 == z**2:
       print('YES')
    else:
        print('NO')

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

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

Solution (Python):
input()
while True:
    try:
        num=list(map(int,input().split()))
        num.sort()
        if num[2]**2==num[0]**2+num[1]**2:
            print("YES")
        else:
            print("NO")
    except EOFError:
        break

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

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

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

solve()

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

Solution (Python):
N=int(input())
for i in range(0,N):
    x,y,z=map(int,input().split())
    if x**2==y**2+z**2:
        print("YES")
    elif y**2==x**2+z**2:
        print("YES")
    else:
        if z**2==x**2+y**2:
            print("YES")
        else:
            print("NO")
    i+=1

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

Solution (Python):
N=int(input())
for i in range(N):
    a=list(map(int,input().split()))
    a.sort()
    if a[0]**2+a[1]**2==a[2]**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())
for i in range(N):
    a,b,c=map(int,input().split())
    A=min(a,min(b,c))
    C=max(a,max(b,c))
    B=a+b+c-A-C
    if A**2+B**2==C**2:
        print("YES")
    else:
        print("NO")

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

Solution (Python):
N=int(input())
for i in range(N):
    a,b,c=map(int,input().split())
    A=a*a
    B=b*b
    C=c*c
   
   
    if a>b and a>c and A==B+C:
        print('YES')
    elif b>a and b>c and B==A+C:
        print('YES')
    elif c>a and c>b and C==A+B:
        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):
N=int(input())
for i in range(N):
    a,b,c=sorted(map(int, input().split()))
    if a*a + b*b == c*c :
        print("YES")
    else :
        print("NO")

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

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

Solution (Python):
s=int(input())
jon=[]
while True:
    try:
        jon.append(input())
    except:
        break
for i in jon:
    pon=sorted(list(map(int,i.split())),reverse=True)
    if pon[0]**2==pon[1]**2+pon[2]**2:
        print('YES')
    else:
        print('NO')

Solution (Python):
N=int(input())
for i in range(N):
    a,b,c = map(int,input().split())
    A=a*a
    B=b*b
    C=c*c
    if A+B==C or A+C==B or B+C==A:
        print("YES")
    else:
        print("NO")

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

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

Solution (Python):
i=int(input())
for j in range(i):
    a,b,c=map(int,input().split())
    d=[a,b,c]
    list=sorted(d)
    x=int(list[0])
    y=int(list[1])
    z=int(list[2])
    if x**2+y**2==z**2:
        print("YES")
    else:
        print("NO")

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

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

Solution (Python):
for i in range ( int ( input ( ) ) ):
    a,b,c = map(int, input().split())
    if a == 0 and b == 0: break
    if a*a+b*b==c*c or b*b+c*c==a*a or c*c+a*a==b*b :
        print('YES')
    else:
        print("NO")

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

Solution (Python):
n=int(input())
for i in range(1,n+1):
    x,y,z=map(int,input().split())
    if x**2+y**2==z**2 or y**2+z**2==x**2 or z**2+x**2==y**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):
N = int(input())
for i in range(N):
    a,b,c = map(int, input().split())
    A = a**2
    B = b**2
    C = c**2
    if A+B==C or A+C==B or B+C==A:
        print("YES")
    else:
        print("NO")

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

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

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

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

Solution (Python):
N = int(input())
for i in range(N):
    a,b,c = map(int,input().split())
    if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
        print('YES')
    else:
        print('NO')

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

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