Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

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

Python: import sys

n = int(input())
print(n)
for i in range(n):
    line = sys.stdin.readline()
    lengths = list(map(int, line.strip().split()))
    if lengths[0] == lengths[1] == lengths[2]:
        print('YES')
    else:
        print('NO')

Python: tri_list = []
N =  int(input())

for i in range(N):
    tri = input()
    tri_list.append(tri.split())
    
for i in range(N):
    tri_list[i].sort()
    if int(tri_list[i][2]) ** 2 == int(tri_list[i][0]) ** 2 + int(tri_list[i][1]) ** 2 :
        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]*l[0]+l[1]*l[1] == l[2]*l[2]: print("YES")
    else: print("NO")

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

def get_input():
    for i in range(int(input())):
        yield "".join(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: 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: 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')