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

Python: import string
import sys
import math

#??????????????\????????????ip?????\??????
ip = sys.stdin.readlines()
ip_list = {}

#?????????????????§?????????
for i in range(len(ip)):
    ip_list[i] = ip[i].strip("\n").split()

for i in range(1,len(ip)):
    for j in range(3):
        #?????????????????????
        for t in range(3):
            for k in range(3):
                if int(ip_list[i][t]) > int(ip_list[i][k]):
                    tmp = ip_list[i][t]
                    ip_list[i][t] = ip_list[i][k]
                    ip_list[i][k] = tmp  
                    
for i in range(1,4):   
    if int(ip_list[i][0])**2 == int(ip_list[i][1])**2 + int(ip_list[i][2])**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: def main():
    n = int(input())
    if n <= 0:
        return None
    li = [int(input()) for _ in range(n)]
    li = sorted(li)
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = tmp[0],tmp[1],tmp[2]
        if (a**2 + b**2) == c**2:
            print("YES")
        else:
            print("NO")
    return None

if __name__ == '__main__':
    main()

Python: #Is it Right Triangre?

n = int(input())
for i in range(n):
    set = input(). split()
    set = [int(a) for a in set] #int?????????
    set.sort()
    if set[0] ** 2 + set[1] ** 2 == set[2] ** 2:
        print("YES")
    else:
        print("NO")

Python: import sys

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

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

Python: # coding: utf-8
# Here your code !
N = int(input())

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

Python: i=1
N=int(input())
while i<=N:
    x,y,z=map(int,input().split())
    if x**2+y**2==z**2:
        print('YES')
        i+=1
    elif y**2+z**2==x**2:
        print('YES')
        i+=1
    elif x**2+z**2==y**2:
        print('YES')
        i+=1
    else:
        print('NO')
        i+=1

Python: n = int(input())
L = [input() for i in range(n)]
for line in L:
	A = line.split()
	B = sorted([int(A[i]) for i in range(3)])
	if B[2]^2 == B[0]^2 + B[1]^2:
		print('YES')
	else:
		print('NO')

Python: times=int(input())
answers=[]
for i in range(times):
    hen=[]
    hen=input().split()
    for j in range(times):
        hen[j]=int(hen[j])
    for j in range(times-1):
        for k in range(times-1):
            if hen[j]>hen[j+1]:
                num=hen[j]
                hen[j]=hen[j+1]
                hen[j+1]=num
    if hen[0]*hen[0]+hen[1]*hen[1]==hen[2]*hen[2]:
        answers.append('Yes')
    else:
        answers.append('No')

for i in range(len(answers)):
    print(answers[i])

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

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