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: n = int(input())
for i in range(0, n):
    nums = list(map(int, input().split()))
    max_num = max(nums)
    nums.remove(max_num)
    if max_num**2 == nums[0]**2 + nums[1]**2:
        print("YES")
    else:
        print("NO")

Python: import sys
for e in sys.stdin:
    a, b, c = sorted(map(int, e.split()))
    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Python: import sys

n = int(input())
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: import sys
for a,b,c in map(lambda x:sorted(map(int,x.split())),sys.stdin.readlines()):
 print(['NO','YES'][a*a+b*b==c*c])

Python: T = int(input())

for tc in range(0,T) :
    a=sorted(map(int,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):
    l = list(map(int,input().split()))
    l.sort()
    if l[0] ** 2 + l[1] ** 2 == l[2] ** 2:
        print('YES')
    else:
        print('NO')

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: N=int(input())
answer=""
for i in range(N):
	if answer!="":
		answer+="\n"
	a=map(int,input().split())
	a.sort()
	if a[0]**2+a[1]**2==a[2]**2:
		answer+="YES"
	else:
		answer+="NO"
print(answer)

Python: for _ 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: [print("YES" if i[0] + i[1] == i[2] else "NO") for _ in range(int(input())) for i in [sorted([int(x) ** 2 for x in input().split()])]]

Python: number = int(input())

for i in range(number):
  tri = list(map(int, input().split(" ")))

  print(str(tri[0]))
  print(str(tri[1]))
  print(str(tri[2]))

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

Python: num = int(input())
output = []
data = []

for x in range(num):
    data = input().split()
    for y in range(len(data)):
        data[y] = int(data[y])
    data.sort()
    if data[2]**2 == data[1]**2 + data[0]**2:
        output.append("YES")
    else:
        output.append("NO")

for x in range(num):
    print(output[x])

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

Python: import math

def main():

    data_count = int(input())
    data = [tuple(map(int, input().split())) for i in range(data_count)]

    for item in data:
        print('YES') if math.hypot(item[0], item[1]) == float(item[2]) else print('NO')


main()

Python: times=int(input())
answers=[]
for i in range(times):
    hen=[]
    hen=input().split()
    for j in range(3):
        hen[j]=int(hen[j])
    for j in range(2):
        for k in range(2):
            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=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: 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]*l[0]+l[1]*l[1]==l[2]*l[2]:
		print("YES")
	else:
		print("NO")

Python: a = int(input())
b = int(1)
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if x[0]**2 + x[1]**2 == x[2]**2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Python: number = int(input())

for i in range(number):
  tri = map(int, input.split(" "))
  if tri[0] > tri[1]:
    buf = tri[0]
    tri[0] = tri[1]
    tri[1] = buf
  if tri[1] > tri[2]:
    buf = tri[1]
    tri[1] = tri[2]
    tri[2] = buf
  if tri[0] * tri[0] + tri[1] * tri[1] == tri[2] * tri[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]**2+L[1]**2==L[2]**2:
        print("YES")
    else:
        print("NO")

Python: n=int(input())
for i in range(n):
	x,y,z=map(int,input().split())
	if (x+y>z)and(y+z>x)and(z+x>y):
		print("YES")
	else:
		print("NO")

Python: import itertools
import operator

line = int(input())
inputs = [input() for _ in range(line)]

def is_right_triangle(a, b, c):
    a, b, c = list(sorted([a,b,c]))
    return a**2 + b**2 == c**2

for line in inputs:
    a, b, c = line.split()
    print("YES" if is_right_triangle(int(a), int(b), int(c)) else "NO")

Python: a=int(input())
for i in range(a):
    x,y,r=map(int,input().split())
    l=[]
    l.append(x)
    l.append(y)
    l.append(r)
    for t in range(2):
        if l[t]>l[t+1]:
            l[t],l[t+1]=l[t+1],l[t]
    if (l[0]**2)+(l[1]**2)==l[2]**2:
        print("YES")
    else:
        print("NO")
    del l

Python: a, b, c = sorted(map(int, input().split()))
if a**2 + b**2 == c**2:
    print('YES')
else:
    print('NO')

Python: count= int(input())

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

Python: import sys

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

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

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

Python: n = int(input())

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

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

Python: import math
N = int(input())
for _ in [0]*N:
    x = sorted(map(int, input().split()))
    print("YES" if x[2] == math.sqrt(x[0]**2+x[1]**2) else "NO")