Go: package main
import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "sort"
)
 
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
 
func main(){
    sc.Split(bufio.ScanWords)
    defer out.Flush()
    n := nextInt()
    for i:=0; i<n; i++{
        data := nextInts(3)
        sort.Ints(data)
        if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
            fmt.Fprintln(out, "YES")
        }else{
            fmt.Fprintln(out, "NO")
        }
    }
}
 
func next() string{
    sc.Scan()
    return sc.Text()
}
 
func nextInt() int{
    a, _ := strconv.Atoi(next())
    return a
}
 
func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

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

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

Python: # usr/bin/python
# coding: utf-8
################################################################################
# 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
#
################################################################################

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

Python: n=int(input())
for i in range(n):
    a=sorted(map(int,input().split()))

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

Python: if __name__ == '__main__':
    # ??????????????\???
    num = int(input())
    triangles = []
    for i in range(num):
        triangles.append([int(x) for x in input().split(' ')])

    # ??´?§?????§???¢?????????????????????
    results = []
    for t in triangles:
        t.sort()
        if t[0]**2 + t[1]**2 == t[2]**2:
            results.append('YES')
        else:
            results.append('NO')

    # ???????????????
    for r in results:
        print(r)

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

Python: #-*-coding:utf-8-*-

def get_input():
    for i in range(int(input())):
        yield "".join(input())

#####end of def get_input()#####

if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)^2 + int(b)^2 == int(c)^2:
            print(u"YES")
        elif int(c)^2 + int(a)^2 == int(b)^2:
            print(u"YES")
        elif int(b)^2 + int(c)^2 == int(a)^2:
            print(u"YES")
        else:
            print(u"NO")

Python: import sys

for line in range(int(input())):
    str = input().split(" ")
    nums = sorted([int(str[2]), int(str[1]), int(str[0])])
    if nums[2]*nums[2] == nums[1]*nums[1] + nums[0]*nums[0]:
        print("YES")
    else:
        print("NO")

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

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

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

Python: n = int(input())

for _ in range(n):
    triangle = list(map(int, input().split()))
    triangle = list(reversed(sorted(triangle)))

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

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

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

Python: N = int(input())

for i in range(N):
    sides = list(map(int, input().split()))
    if max(sides) == min(sides):
        print('YES')
    else:
        print('NO')

Python: while True:
	try:
		a,b,c = map(int, input().split())
	except:
		exit()

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

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

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

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

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

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()]
print(tri(x,y,z))

Python: n=int(input())

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

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

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