Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	nQueries := nextInt()
	for i := 0; i < nQueries; i++ {
		lengths := []int{nextInt(), nextInt(), nextInt()}
		sort.Slice(lengths, func(i, j int) bool { return lengths[i] > lengths[j] })
		if math.Pow(float64(lengths[0]), 2) == math.Pow(float64(lengths[1]), 2)+math.Pow(float64(lengths[2]), 2) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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):
    line = input()
    a, b, c = sorted(int(w) for w in line.split())

    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Python: # coding: utf-8
# Your code here!
N=int(input())
for i in range(N):
    a,b,c=map(int,input().split())
    
    a,b,c=sorted([a,b,c])
    
    if a**2+b**2==c**2:
        print('YES')
    else:
        print('NO')

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

Python: print("\n".join("YES" if max(x) * 2 == sum(x) else "NO" for _ in range(int(input())) for x in [list(map(lambda x: int(x)**2, input().split()))]))

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

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

Python: if __name__ == "__main__":
    line = input()
    a = int(line.split(" ")[0])
    b = int(line.split(" ")[1])
    c = int(line.split(" ")[2])
    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")
    exit(0)

Python: data = []
n = int(input())
for i in range(n):
    data.append(list(map(int, input().split())))
    data[i] = sorted(data[i])[::-1]

for j in range(n):
    if data[j][0]**2 == data[j][1]**2 + data[j][2]**2:
        print('YES')
    else:
        print('NO')

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

Python: n = int(input())
while n>0:
  l = [int(i) for i in input().split()]
  l.sort()
  if l[0]**2 + l[1] ** 2 == l[2] ** 2:
    print('YES')
  else:
    print('NO')
  n -= 1

Python: import sys


__author__ = 'bisuk'

i = 0
list = []
for line in sys.stdin.readlines():
    # list1 = line.split(" ")
    list.append(line)
    # list.append(int(line.strip("\n")))

# print("N = "+str(list[0]))
#print(list)
for i in range(1, int(list[0]) + 1):
    #print("i="+str(i) + " :" + list[i]),
    list2 = sorted(list[i].strip("\n").split(" "))
    #print(list2)
    if int(list2[0]) * int(list2[0]) + int(list2[1]) * int(list2[1]) == int(list2[2]) * int(list2[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: n=int(input())
a_list=[]
for i in range(n):
	k=list(map(int,input().split(" ")))
	L,M,N=sorted(k)
	if L**2+M**2==N**2:
		a_list.append("YES")
	else:
		a_list.append("NO")
for i in a_list:
	print(i)

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: 
#!/usr/bin/env python
# coding: utf-8


def is_right_triangle(L):
    L.sort()
    return L[0] ** 2 + L[1] ** 2 == L[2] ** 2


def main():
    input_count = int(raw_input())
    inputs = []
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        inputs.append(L)

    for L in inputs:
        print ("N0", "YES")[is_right_triangle(L)]

if __name__ == '__main__':
    main()

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 == c**2 + a**2 or c**2 == a**2 + b**2 :
        print("YES")
    else :
        print("NO")

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