Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

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

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

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

Python: n=input()

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

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

Python: # -*- coding: utf-8 -*-
for i in range(int(input())):
    values = sorted(map(lambda x: int(x)**2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print("YES")
    else:
        print("NO")

Python: N = int(input())

for i in range(N):
    adjacent_side_1, adjacent_side_2, hypotenuse = sorted(list(map(int, input().split())))
    if adjacent_side_1**2 + adjacent_side_2**2 == hypotenuse**2:
        print('YES')
    else:
        print('NO')

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

Python: d=input()
for a in range(int(d)):
    a,b,c=map(int,input().split())
    if(max(a,b,c)*2>=a+b+c):
        print(False)
    else:
        print(True)

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: for i in range(int(input())):
	values = sorted(map(lambda x: int(x)^2, input().split()))
	if values[2] == values[1] + values[0]:
		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])**2for ln in __import__("sys").stdin]]

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

Python: import sys;
#from me.io import dup_file_stdin

#@dup_file_stdin
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()

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

Python: n =  int(input())
for i in range(n):
    tri_list = input().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())
for i in range(N):
    a = list(map(int, input().split()))
    a = sorted(a)
    x = a[0]
    y = a[1]
    z = a[2]
    if x**2 + y**2 == z**2:
        print("YES")
    else:
        print("NO")

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

Python: cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if int(z ** 2) == int(x ** 2) + int(y ** 2):
        print('YES')
    else:
        print('NO')

Python: N = input()
a = []
answer_list = []

for i in range(N):
    a.append(map(int, raw_input().strip().split()))

for j in range(len(a)):
    number_1 = a[j][0]
    number_2 = a[j][1]
    number_3 = a[j][2]

    number_1_mul = number_1 ** 2
    number_2_mul = number_2 ** 2
    number_3_mul = number_3 ** 2

    if number_1_mul == number_2_mul + number_3_mul:
        print("YES")
    if number_2_mul == number_3_mul + number_1_mul:
        print("YES")
    if number_3_mul == number_1_mul + number_2_mul:
        print("YES")

    else:
        print("NO")

Python: 
N = int(input())
A = []
B = []
C = []#最長辺
for i in range(N):
    a, b, c = map(int, input().split())
    if(a > b):#a,bを昇順に並び替える
        t = a
        a = b
        b = t
    if(b > c):#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")

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

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

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

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

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

for i in range(N):
    tri = input()
    tri_list.append(tri.split())
    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())

l = []
for i in range(n):
    line = input()

    numl = line.split(' ')

    numl.sort()
    l.append(numl)

for i in range(n):

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

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

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

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

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

Python: x=input()
i=0
while int(x)>i :
    a,b,c=input().split()
    a=int(a)
    b=int(b)
    c=int(c)
    if a*a==b*b+c*c or b*b==c*c+a*a or c*c==b*b+a*a :
        print("YES")
    else :
        print("NO")
    i=i+1