Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)

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

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
    print("a")
    print("b")
    if a == b:
        print("YES")
    else:
        print("NO")

Python: # -*- coding: utf-8 -*-
import math
num = int(raw_input())
for i in range(num):
    list = [int(x) for x in raw_input().split(" ")]
    list.sort(lambda n1, n2:n2 - n1)
    if list[0]**2 == list[1]**2 + list[2]**2:
        print("YES")
    else:
        print("NO")

Python: n = int(input())
for i in range(n):
    s = input().split(" ")
    s = [int(j) for j in s]
    s.sort()
    a = s[0]
    b = s[1]
    c = s[2]

    if(a**2+b**2==c**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: #coing:utf-8


def distance(a,b):

    dst = pow(a,2) + pow(b,2)

    return dst

def isTriangle(lines):

    idxList = [[0,1,2],[1,0,2],[2,0,1]]
    flag = False
    for i in idxList:
        if not flag and pow(lines[i[0]],2) == distance(lines[i[1]], lines[i[2]]):
            flag = True

    return flag

if __name__ == '__main__':

    num = int(input())

    results = []

    for i in range(num):
        lines = [int(item) for item in input().split(" ")]
        results.append(isTriangle(lines))

    for r in results:
        if r:
            print("YES")
        else :
            print("NO")

Python: N = int(input())

for i in range(N):
	sides = list(map(int, input().split()))
	longestSide = max(sides)
	sides.remove(longestSide)
	if (longestSide ** 2) == (sides[0] ** 2 + sides[1] ** 2):
		print('YES')
	else:
		print('NO')

Python: N=int(input())

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

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

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

Python: i = 0
n = int(input())
for i in range(n):
    x, y, z = map(int, input().split())
    if x**2 + y**2 == z**2 or x**2 + z**2 == y**2 or y**2 + z**2 == x**2: 
        print('YES')
    
    else:
        print('NO')

Python: n = int(input())
tr = set()
for i in range(n):
    tr.add(map(int, input().split()))


for n in tr:
    if len(set(n)) == 1:
        print('YES')
    else:
        print('NO')

Python: # -*- coding:utf-8 -*-

def check(val):
    val.sort()
    a=int(val[0])*int(val[0])
    b=int(val[1])*int(val[1])
    c=int(val[2])*int(val[2])

    flag=(c==a+b)
    return flag

def main():
    N=int(input())
    LIST=[]

    for i in range(N):
        a=input()
        val=a.split(" ")
        LIST.append(val)
        
    for i in range(N):
        if check(LIST[i]):
            print("YES")

        else:
            print("NO")

if __name__=="__main__":
    main()

Python: def main():
    N = int(input())
    a = []
    for _ in range(N):
        a.append(list(map(int, input().split())))

    for x in range(N):
        a[x].sort(reverse = True)
        if a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2:
            print("YES")
        else:
            print("NO")


if __name__ == "__main__":
    main()

Python: 
def check(a, b, c):

    a2 = a ** 2
    b2 = b ** 2
    c2 = c ** 2

    if (a2 + b2) == c2:
        return True
    else:
        return False


n = int(input())

for c in range(n):
    line = input()
    datas = map(int, line.split())
    li = list(datas) 
    a = li[0]
    b = li[1]
    c = li[2]

    if check(a, b, c) or check(b, c, a) or check(c, a, b):
        print("YES")
    else:
        print("NO")

Python: def main():
    n = int(input())
    for i in range(n):
        Array = list(map(int,input().split()))
        Array.sort()
        if Array[2]**2 == Array[0]**2 + Array[1]**2:
            print("YES")
        else:
            print("No")

if __name__ == '__main__':
    main()

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

        else:
            print("NO")

Python: from __future__ import absolute_import, print_function, unicode_literals
import sys

def judge(a, b, c):
    print('YES' if (a == b + c or b == c + a or c == a + b) else 'NO')

sys.stdin.readline()
for line in sys.stdin:
    judge(*(int(n) ** 2 for n in line.split()))

Python: def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True


def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO")

if __name__ == '__main__':
    run()

Python: import sys
import math

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: n = int(input())

for i in range(n):
    a,b,c = list(map(int, input().split()))
    M = max([a,b,c])
    result = False
    if a == M:
        result = (a * a == b * b + c * c)
    elif b == M:
        result = (b * b == a * a + c * c)
    elif c == M:
        result = (c * c == a * a + b * b)
    if result:
        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: N = int(input())
for i in range(N):
    a,b,c = map(int,input().split())
    if a*a + b*b == c*c or b*b+c*c == a*a or a*a+c*c == b*b:
        print("YES")
    else:
        print("NO")

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

for i in range(N):
    a.append(map(int, 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 = number_1 * 2
    number_2 = number_2 * 2
    number_3 = number_3 * 2

    if number_1 == number_2 + number_3:
        print("YES")
    if number_2 == number_3 + number_1:
        print("YES")
    if number_3 == number_1 + number_2:
        print("YES")

    else:
        print("NO")