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):
if __name__ == "__main__":
    n = int(input().strip().split()[0])
    for i in range(n):
        data = list(map(int,input().strip().split()))
        c = max(data)
        data.remove(c)
        a,b = data
        if a **2 + b ** 2 == c**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[2]**2 == a[1]**2+a[0]**2:
        print('YES')
    else:
        print('NO')

Solution (Python):
import math
N = int(input())
for _ in [0]*N:
    x = sorted(map(int, input().split()))
    print("YES" if x[2] == math.sqrt(x[0]**2+x[1]**2) else "NO")

Solution (Python):
import sys

n = input()

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

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

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

Solution (Python):
n = int(input())
for i in range(n):
    a = list(map(int, input().split()))
    m = max(a)
    b = sum([i**2 for i in a if i != m])
    if (m**2 == b):
        print("YES")
    else:
        print("NO")

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

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

Solution (Python):
import sys
import math

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(raw_input())
for i in range(n):
    e = map(int, raw_input().split())
    e.sort()
    if e[2] * e[2]== e[0] * e[0] + e[1] * e[1]:
        print "YES"
    else:
        print "NO"

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

Solution (Python):
N = int(input())
for i in range(N):
	line = input()
	l = [None]*3
	l[0] = int(line.split()[0])
	l[1] = int(line.split()[1])
	l[2] = int(line.split()[2])
	l.sort()
	if l[0]**2+l[1]**2==l[2]**2:
		print("YES")
	else:
		print("NO")

Solution (Python):
n = int(input())
for _ in range(n):
    l = list(map(int,input().split()))
    idx = l.index(max(l))
    c = l[idx]
    a, b  = [x for i,x in enumerate(l) if i != idx] 
    if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
def tri(a,b,c):
	return a**2 == b**2 + c**2
for time in range(int(input())):
	x,y,z = [int(i) for i in input().split()]
	if tri(x,y,z) or tri(y,z,x) or tri(z,x,y):
		print("YES")
	else:
		print("NO")

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

while n > 0:
  d = map(int, raw_input().split())
  d.sort()
  a = d[0]
  b = d[1]
  c = d[2]

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

  n = n-1

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

Solution (Python):
def main():

    data_count = int(input())
    data = [list(map(int, input().split())) for i in range(data_count)]

    for item in data:
        item.sort()
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')


main()

Solution (Python):
def isRightTriangle(lineList):
    if lineList[0]**2 + lineList[1]**2 == lineList[2]**2:
        return True
    else:
        return False
if __name__ == '__main__':
    n = (int)(input())
    for _ in range(0,n):
        tmp = list(map(int,input().split()))
        tmp.sort()
        print("YES" if isRightTriangle(tmp) else "NO")

Solution (Python):


lineNum = int(input())

for i in range(lineNum):
    line = input()
    tokens = list(map(int, line.strip().split()))

    tokens.sort()

    a, b, c = tokens[0], tokens[1], tokens[2]

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

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

Solution (Python):
import sys;



def solve():
    n=int(sys.stdin.readline())
    for i in range(n):
        x=[int(num) for num in sys.stdin.readline().split(' ')]
        x.sort();
        if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO")
solve()

Solution (Python):
import sys
l = sys.stdin.readlines ()
del l[0] 
for line in l:
    data = map (int, line.split (" "))
    data.sort(reverse=True)
    if data[0]**2 == data[1]**2 + data[2]**2:
        print ("YES")
    else: print ("NO")

Solution (Python):

import math


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

Solution (Python):






























if __name__ == "__main__":
    num = int(input())
    inputline = [""]*num
    for i in range(0,num):
        inputline[i] = input()
    for line in inputline:
        a = int(line.split(" ")[0])
        b = int(line.split(" ")[1])
        c = int(line.split(" ")[2])
        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):
def ifTriangle(a, b, c):
    if (a**2) + (b**2) == c**2: print("YES")
    else: print("NO")

n=int(input())
for i in range(n):
    lines=list(map(int, input().split()))
    lines.sort()
    ifTriangle(lines[0], lines[1], lines[2])

Solution (Python):

N = input()

a = []
for i in range(int(N)):
    s = input().split()
    ss = [int(s[0]), int(s[1]), int(s[2])]
    ss.sort()

    if ss[2]**2 == ss[0]**2 + ss[1]**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):


n = int(raw_input())
for i in range(n):
	data = map(int, raw_input().split())
	if data[0]**2 == data[1]**2 + data[2]**2:
		print("YES")
	elif data[1]**2 == data[2]**2 + data[0]**2:
		print("YES")
	elif data[2]**2 == data[0]**2 + data[1]**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):
N=int(input())
for i in range(N):
    lst=sorted([int(s) for s in input().split()],reverse=True)
    if lst[0]**2 == lst[1]**2+lst[2]**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
class triangle():
    def __init__(self,a,b,c):
        self.a = a
        self.b = b
        self.c = c

    def calc(self):
        a = int(self.a**2)
        b = int(self.b**2)
        c = int(self.c**2)

        if (a+b == c) or (b+c == a) or (a+c == b):
            return True
        else:
            return False

    def print(self):
        ans = self.calc()
        if ans:
            print("YES")
        else:
            print("NO")

def main():
    data = []
    array_size = int(input())

    for i in range(array_size):
        n = input().split()
        a = int(n[0])
        b = int(n[1])
        c = int(n[2])

        data.append(triangle(a,b,c))

    for array in data:
        array.print()

if __name__ == "__main__":
    main()

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

n=int(input())
for i in range(n):
    lines=list(map(int, input().split()))
    lines.sort()
    ifTriangle(lines[0], lines[1], lines[2])

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

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

for i in range(0,count):
    a,b,c=map(int,raw_input().split())
    if pow(a,2)+pow(b,2)==pow(c,2):
        print 'YES'
    elif pow(a,2)+pow(c,2)==pow(b,2):
        print 'YES'
    elif pow(b,2)+pow(c,2)==pow(a,2):
        print 'YES'
    else:
        print 'NO'

Solution (Python):
count=int(raw_input())
ans =[]
for i in range(0,count):
    a,b,c=map(int,raw_input().split())
    if pow(a,2)+pow(b,2)==pow(c,2):
        ans.append("YES")
    elif pow(a,2)+pow(c,2)==pow(b,2):
        ans.append("YES")
    elif pow(b,2)+pow(c,2)==pow(a,2):
        ans.append("YES")
    else:
        ans.append("NO")

for i in range(0,count):
    print ans[i]

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:
        print('YES')
    elif A+C==B:
        print('YES')
    elif B+C==A:
        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:print('YES')
    elif A+C==B:print('YES')
    elif B+C==A:print('YES')
    else:print('NO')

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

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
count=int(raw_input())
ans =[]
for i in range(0,count):
    a,b,c=map(int,raw_input().split())
    if pow(a,2)+pow(b,2)==pow(c,2):
        ans.append("YES")
    elif pow(a,2)+pow(c,2)==pow(b,2):
        ans.append("YES")
    elif pow(b,2)+pow(c,2)==pow(a,2):
        ans.append("YES")
    else:
        ans.append("NO")

for i in range(0,count):
    print ans[i]

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

Solution (Python):
n=int(input())
for i in range(n):
    c,d,b=map(int,input().split())

    if c*c+d*d==b*b or c*c+b*b==d*d or b*b+d*d==c*c:
        print("YES")
    else:
        print("NO")

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

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

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

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Solution (Python):
for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

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

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

Solution (Python):
for _ in range(int(input())):
    datasqr = [i ** 2 for i in sorted(list(map(int, input().split())))]
    print('YES' if sum(datasqr[:2]) == datasqr[-1] else 'NO')

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

Solution (Python):
n = int(input())
for _ 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 _ 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 _ 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 _ 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 _ 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):
while True:
    n = int(input())
    if n <= 1000:
        break

for i in range(1, n+1):
    l = list(map(int, input().split()))
    l.sort()
    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 = 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(" "))
    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):
	li  = sorted(map(int, input().split()))
	if(pow(li[0], 2) + pow (li[1], 2) == pow(li[2], 2)):
		print('YES')
	else:
		print('NO')

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

Solution (Python):
def solve():
    data = read()
    result = think(data)
    write(result)


def read():
    n = int(input())
    data = []
    for i in range(n):
        data.append(read_data())
    return data


def read_data():
    return list(map(int, input().split(' ')))


def think(data):
    result = []
    for d in data:
        if is_right_triangle(d):
            result.append('YES')
        else:
            result.append('NO')
    return result


def is_right_triangle(d):
    x, y, z = d[0], d[1], d[2]
    return (x ** 2 == y ** 2 + z ** 2) or (y ** 2 == z ** 2 + x ** 2) or (z ** 2 == x ** 2 + y ** 2)


def write(result):
    for r in result:
        print(r)


if __name__ == '__main__':
    solve()

Solution (Python):
for i 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())):
    temp = [int(x) for x in input().split()]
    stemp = sorted(temp)
    if stemp[2]**2 == stemp[1]**2 + stemp[0]**2:
        print('YES')
    else:
        print('NO')

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

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

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

Solution (Python):
import collections
import sys

def read_prob():
    inputs = []
    try:
        counter = 0
        while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
    except EOFError:
        pass
    return inputs

def triangle(inputs):
    f = lambda x: x * x
    inputs = list(map(f, inputs))
    
    a, b, c = inputs[0], inputs[1], inputs[2]
    if a + b == c:
        return True
    elif a + c == b:
        return True
    elif b + c == a:
        return True
    else:
        return False

if __name__ == '__main__':
    inputs = read_prob()
    for inp in inputs:
        if triangle(inp):
            print("YES")
        else:
            print("NO")

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

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

Solution (Python):

N = int(input())
A = []
B = []
C = []
for i in range(N):
    a, b, c = map(int, input().split())
    if(a > b):
        t = a
        a = b
        b = t
    if(b > c):
        t = b
        b = c
        c = t
    A.append(a)
    B.append(b)
    C.append(c)
for i in range(N):
    if(A[i]**2 + B[i]**2 == C[i]**2):
        print("YES")
    else:
        print("NO")

Solution (Python):
for _ in range(int(input())):
    e = list(map(int, input().split()))
    print("YES" if max(e) ** 2 * 2 == sum(i ** 2 for i in e) else "NO")

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

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

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

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):
    triangle = sorted([int(n) for n in input().split()])
    if triangle[0]**2 + triangle[1]**2 == triangle[2]**2:
        print('YES')
    else:
        print('NO')

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

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

main()

Solution (Python):

round = int(input(""))
for i in range (0,round):
    arr = []
    temp = input("")
    a,b,c = temp.split(" ")
    arr.append(int(a))
    arr.append(int(b))
    arr.append(int(c))
    arr.sort()
    if(pow(arr[0],2)+pow(arr[1],2)==pow(arr[2],2)):
        print("YES")
    else:
        print("NO")

Solution (Python):

round = int(input(""))
for i in range (0,round):
    arr = []
    temp = input("")
    a,b,c = temp.split(" ")
    arr.append(int(a))
    arr.append(int(b))
    arr.append(int(c))
    arr.sort()
    if(pow(arr[0],2)+pow(arr[1],2)==pow(arr[2],2)):
        print("YES")
    else:
        print("NO")

Solution (Python):
N = int(input())
lst = [list(map(int, input().split())) for _ in range(N)]
for i in lst:
    i.sort()
    if i[0] ** 2 + i[1] ** 2 == i[2] ** 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]*a[0] + a[1]*a[1] == a[2]*a[2]:
        print('YES')
    else:
        print('NO')

Solution (Python):
N = int(input())
for i in range(N):
    a = [int(i) for i in input().split()]
    a.sort(reverse=True)
    if a[0]**2 == a[1]**2+a[2]**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):
for i in range(int(input())):
    llist = list(map(int,input().split()))
    llist.sort()
    if(llist[2]**2 == llist[0]**2 + llist[1]**2):
        print('YES')
    else:
        print('NO')

Solution (Python):
def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True


def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO")

if __name__ == '__main__':
    run()

Solution (Python):
def run():
    n = int(input())
    data = []
    for _ in range(n):
        data.append(list(map(int, input().split())))

    for d in data:
        _data = d[:]
        mx = max(_data)
        _data.remove(mx)
        if mx**2 == sum([x**2 for x in _data]):
            print('YES')
        else:
            print('NO')
        

if __name__ == '__main__':
    run()

Solution (Python):
print "\n".join(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()))]))

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

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

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

Solution (Python):

import math
num = int(raw_input())
for i in range(num):
    list = [int(x) for x in raw_input().split(" ")]
    list.sort(lambda n1, n2:n2 - n1)
    if list[0]**2 == list[1]**2 + list[2]**2:
        print("YES")
    else:
        print("NO")

Solution (Python):
import sys

N = int(sys.stdin.readline())

def check(num_list):
    largest = max(num_list)
    largest_idx = num_list.index(largest)
    tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx])
    if tmp == pow(largest, 2):
        return "YES"
    else:
        return "NO"

for i in xrange(N):
    line = sys.stdin.readline()
    num_list = map(int, line.strip().split())
    print "{0}".format(check(num_list))

Solution (Python):
count = int(input())
for i in range(count):
  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):
n = int(input())

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

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

Solution (Python):


c = int(raw_input())

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

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

n=input()
for i in range(n):
    a,b,c=map(int,raw_input().split())
    if(ok(a,b,c) or ok(b,c,a) or ok(c,a,b)):
        print "YES"
    else:
        print "NO"

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

Solution (Python):
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 "YES"
    else:
        print "NO"

Solution (Python):
def pgr(x, y, z):
    if x**2 + y**2 == z**2: return True
    else: return False
    
while 1:
    try:
        n = input()
        for i in range(n):
            a,b,c = map(int, raw_input().split())
            if (pgr(a,b,c) or pgr(b,c,a) or pgr(c,a,b)): print 'YES'
            else: print 'NO'
        break
    except EOFError:
        break

Solution (Python):

nums = input()
lines = [[]]*nums

for x in range(nums):
    lines[x] = map(int, raw_input().split(' '))


for li in lines:
    li.sort()

for li in lines:
    if li[0]**2 + li[1]**2 == li[2]**2 :
        print 'YES'
    else:
        print 'NO'

Solution (Python):




def is_right_triangle(a, b, c):
    return a ** 2 + b ** 2 == c ** 2


def main():
    input_count = int(raw_input())
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        L.sort()
        print ("NO", "YES")[is_right_triangle(*L)]

if __name__ == '__main__':
    main()

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

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

Solution (Python):
n = input()

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

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

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

Solution (Python):

import sys

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

Solution (Python):
from __future__ import absolute_import, print_function, unicode_literals
import sys

def judge(a, b, c):
    print('YES' if (a == b + c or b == c + a or c == a + b) else 'NO')

sys.stdin.readline()
for line in sys.stdin:
    judge(*(int(n) ** 2 for n in line.split()))

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

Solution (Python):
for i in range(int(raw_input())):a=sorted([int(x)**2 for x in raw_input().split()]);print ["NO","YES"][a[0]+a[1]==a[2]]

Solution (Python):
for val in range(input()):
	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):
import sys
n = raw_input()
for line in sys.stdin:
    li = sorted([int(x) for x in line.split()],reverse=True)
    print "YES" if (li[0]**2 == li[1]**2 + li[2]**2) else "NO"

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

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

Solution (Python):
data = []
try:
    while True:
        data.append(raw_input())

except EOFError:
    pass

n = int(data[0])
if n <= 1000:
    for i in range(1, n+1):
        x, y, z = data[i].split()
        x, y, z = int(x), int(y), int(z)
        if x <= 1000 and y <= 1000 and z <= 1000:
            if (z * 0.8 == x and z * 0.6 == y
                or z * 0.8 == y and z * 0.6 == x
                or y * 0.8 == x and y * 0.6 == z
                or y * 0.8 == z and y * 0.6 == x
                or x * 0.8 == z and x * 0.6 == y
                or x * 0.8 == y and x * 0.6 == z):
                print "YES"
            else:
                print "NO"

Solution (Python):
import sys

count = int(raw_input())

while 0 < count:
    count -=1
    
    a = map(int,raw_input().split())
    

    if a[1]< a[2]:
        tmp = a[1]
        a[1] = a[2]
        a[2] = tmp

    if a[0] < a[1]:
        tmp = a[0]
        a[0] = a[1]
        a[1] = tmp

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