Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)

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

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

Python: [print("YES"if e else"NO")for e in[int(ln.split()[0])**2+int(ln.split()[1])**2==int(ln.split()[2])**2 for ln in __import__("sys").stdin]]

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

Python: import sys

input()
for a,b,c in map(lambda x: sorted(map(int,x.split())),sys.stdin.readlines()):
    if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO")

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

Python: h=int(input())
for i in range(0, h):
	n=list(map(int, input().split()))#ファイルの読み込み --.py <--.txt
	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")

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("YES" * flag + "NO" * flag)

Python: # coding: utf-8
num = int(input())
for i in range(num):
    ls = list([int(i) for i in input().split()])
    ls.sort()
    if ls[0]**2 + ls[1]**2 == ls[2]**2:
        print("YES")
    else:
        print("NO")

Python: n=int(input())
for i in range(n):
    edge=input().split()
    edge=[int(j) for j in edge]
    edge.sort()

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

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

Python: if __name__ == '__main__':

	n = int(input())
	for _ in range(n):
		n,m,s = map(int,input().split())
		if n*n == m*m + s*s or m*m == n*n + s*s or s*s == m*m + n*n:
			print("YES")
		else:
			print("NO")

Python: 
# compare function
def comp(items):
    return (items[0]**2 + items[1]**2 == items[2]**2)


# main function
def main():
    n = int(input())

    items = [0] * 3
    for tm in range(n):
        str = (input()).split()
        for i in range(3):
            items[i] = int(str[i])

        items.sort()

        if(comp(items)):
            print("YES")
        else:
            print("NO")


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

if __name__ == '__main__':
    main()

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

Python: n=int(input())
for i in range(1,n+1):
    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')

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

Python: def main():
    n = int(input())
    while True:
        try:
            li = [int(i) for i in input().split()]
            li = sorted(li)
            for x in li:
                tmp = x.split(" ")
                for i in range(len(tmp)):
                    tmp[i] = int(tmp[i])
                tmp = sorted(tmp)
                a,b,c = tmp[0],tmp[1],tmp[2]
                if (a**2 + b**2) == c**2:
                    print("YES")
                else:
                    print("NO")
        except EOFError:
            break
    return None

if __name__ == '__main__':
    main()

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

Python: n = int(input())

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

Python: def judgeTriangle(a, b, c):
    if c * c == a * a + b * b:
        result = 'YES'
    else:
        result = 'NO'
    return result


for i in range(int(input())):
    numList = list(map(int, input().split()))
    numList.sort()
    a, b, c = numList
    print(judgeTriangle(a, b, c))

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

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