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: 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):
    a = list(map(int, input().split()))
    m = max(a)
    b = sum([i**2 for i in a if i != m])
    if (m**2 == b):
        print("YES")
    else:
        print("NO")

Python: #coding:utf-8

i = input()
q = []
for n in range(i):
    l = map(int, raw_input(). split())
    a = min(l)
    l.remove(min(l))
    b = min(l)
    c = max(l)
    if a ** 2 + b ** 2 == c ** 2:
        q.append("YES")
    else:
        q.append("NO")

for s in xrange(len(q)):
    print(q[0])
    q.pop(0)

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")
    elif array[i][0]**2+array[i][2]**2 == array[i][1]**2:
        print("Yes")
    elif array[i][1]**2+array[i][2]**2 == array[i][0]**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: n=int(input())
for i in range(n):
    x=list(map(int,input().split()))
    x.sort()
    a=x[0]
    b=x[1]
    c=x[2]
    if a*a+b*b==c*c:
        print('YES')
    else:
        print('NO')

Python: def main():
    n = int(input())
    for i in range(n):
        a, b, c=(int(x) for x in input().split())
        if a+b<=c or a+c<=b or b+c<=a:
            print("NO")
        else:
            print("YES")

main()

Python: n =  int(input())

for i in range(n):
    tri = input()
    tri_list = tri.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: def main():
    input_line = raw_input()
    N = int(input_line)
    
    for i in range(N):
        input_line = raw_input()
        num_lis = []
        for num in input_line.split(' '):
            num_lis.append(int(num))
        num_lis.sort(reverse=True)
        if num_lis[0]**2 == num_lis[1]**2 + num_lis[2]**2:
            print('YES')
        else:
            print('NO')

if __name__ == '__main__':
    main()

Python: n = int(input())
for i in range(n):
    side = list(map(int,input().split()))

    side.sort()
    if(side[0]**2 + side[1]**2 == side[2]**2):
        print("Yes")
    else:
        print("No")

Python: n = int(input())
for i in range(0, n):
    a, b, c = sorted(map(int, input().strip("\n").split(" ")))
    # a,b,c = sorted(input().strip("\n").split(" "))
    #print(a, b, c)
    if c*c - (a*a + b*b) == 0:
        print("YES")
    else:
        print("NO")

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

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

Python: a = int(input())
for i in range(a):
    values = sorted(map(lambda x: int(x)^2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print('YES')
    else:
        print('NO')

Python: class triangle():
    def __init__(self,a,b,c):
        self.a = a
        self.b = b
        self.c = c

    def calc(self):
        a = int(self.a**2)
        b = int(self.b**2)
        c = int(self.c**2)

        if (a+b == c) or (b+c == a) or (a+c == b):
            return True
        else:
            return False

    def print(self):
        ans = self.calc()
        if ans:
            print("YES")
        else:
            print("NO")

def main():
    data = []
    array_size = int(input())

    for i in range(array_size):
        n = input().split()
        a = int(n[0])
        b = int(n[1])
        c = int(n[2])

        data.append(triangle(a,b,c))

    for array in data:
        array.print()

if __name__ == "__main__":
    main()

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

Python: n = int(input())
length = [[]*3]*n
for i in range(n):
    length[i] = input().split()

for i in range(n):
    
    if int(length[i][0])**2 == int(length[i][1])**2 + int(length[i][2])**2:
        print("YES")
        continue

    if int(length[i][1])**2 == int(length[i][2])**2 + int(length[i][0])**2:
        print("YES")
        continue

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

Python: import collections
import sys

def read_prob():
    inputs = []
    try:
        counter = 0
        while True:
            if counter == 0:
                line = input().strip()
                size = int(line)
            else:
                line = input().strip().split()
                a, b, c = line[0], line[1], line[2]
                inputs.append([int(a),  int(b), int(c)])
            counter += 1
    except EOFError:
        pass
    return inputs

def triangle(inputs):
    f = lambda x: x * x
    inputs = list(map(f, inputs))
    # print(inputs)
    a, b, c = inputs[0], inputs[1], inputs[2]
    if a + b == c:
        return True
    elif a + c == b:
        return True
    else:
        return False

if __name__ == '__main__':
    inputs = read_prob()
    for inp in inputs:
        if triangle(inp):
            print("YES")
        else:
            print("NO")

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