Go: package main

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

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

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

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

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

Python: while True:
    try:
        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")
        

    except:
        break

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

Python: times = int(input())

for i in range(0, times):
	edge = []
	for e in input().split(" "):
		edge.append(int(e))
	edge.sort()
	if pow(int(edge[0]), 2) + pow(int(edge[1]), 2) == pow(int(edge[2]), 2):
		print("YES")
	else:
		print("NO")

Python: N =  int(input())

for i in range(N):
    tri = input()
    tri_list = tri.split()
    tri_list.sort()
    print(tri_list)
    if int(tri_list[2]) ** 2 == int(tri_list[0]) ** 2 + int(tri_list[1]) ** 2 :
        print("YES")
    else:
        print("NO")

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

import sys

def is_right_triangle(hypotenuse, x, y):
    if x**2 + y**2 == hypotenuse**2:
        return True
    return False

def main():
    N = int(input())
    for i in range(N):
        length = [int(n) for n in input().split()]
        length.sort(reverse=True)
        ret = 'YES' if is_right_triangle(*length) else 'NO'
        print(ret)

if __name__ == '__main__':
    main()

Python: for i in range(input()):
    a=map(int,raw_input().split())
    if a[0]**2+a[1]**2==a[2]:print("Yes")
    else:print("No")

Python: # usr/bin/python
# coding: utf-8
################################################################################
# Is it a Right Triangle?
# Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
#
# Input
# Input consists of several data sets. In the first line, the number of data set, N is given. Then, N lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
#
# Constraints
# 1 ??? length of the side ??? 1,000
# N ??? 1,000
# Output
# For each data set, print "YES" or "NO".
#
# Sample Input
# 3
# 4 3 5
# 4 3 6
# 8 8 8
# Output for the Sample Input
# YES
# NO
# NO
#
################################################################################

import math
import fileinput

if __name__ == "__main__":
    for line in fileinput.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: triangle = []
n = int(input())
for i in range(n):
    try:
        (a,b,c) = input().split(" ")
        triangle.append((a,b,c))
    except:
        break
for (a,b,c) in triangle:
    if (int(a)**2 + int(b)**2 == int(c)**2) or (int(b)**2 + int(c)**2 ==int(a)**2) or (int(a)**2 + int(c)**2 == int(b)**2) :
        print("YES")
    else:
        print("NO")

Python: while True:
    try:
        num = int(input())
        for i in range(num):
            lengths = (int(x) for x in input().split())
            sortLengths = sorted(lengths)
            
            if(sortLengths[2] * sortLengths[2] == (sortLengths[1] * sortLengths[1]) + (sortLengths[0] * sortLengths[0])):
                print("YES")
            else:
                print("NO")
    except EOFError:
        break

Python: N=int(input())
for i in range(0,N):
    x,y,z=map(int,input().split())
    if x**2==y**2+z**2:
        print("YES")
    elif y**2==x**2+z**2:
        print("YES")
    else:
        if z**2==x**2+y**2:
            print("YES")
        else:
            print("NO")
    i+=1

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: def main():
    n = int(input())
    li = [input() for _ in range(n)]
    li = sorted(li)
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = int(tmp[0]),int(tmp[1]),int(tmp[2])
        if (a ** 2 + b **2) == c**2:
            print("YES")
        else:
            print("NO")

if __name__ == '__main__':
    main()

Python: # -*-coding:utf-8

lineNum = int(input())

for i in range(lineNum):
    line = input()
    tokens = list(map(int, line.strip().split()))

    tokens.sort()

    a, b, c = tokens[0], tokens[1], tokens[2]

    if pow(a,2)+pow(b,2) == pow(c,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(["NO", "YES"][flag])

Python: import sys

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

Python: N = int(input())
lst = []
for _ in range(N):
    a, b, c = map(int,input().split())
    lst.append([a, b, c])
for i in lst:
    i.sort()
    if i[0] ** 2 + i[1] ** 2 == i[2] ** 2:
        print('YES')
    else:
        print('NO')

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

Python: deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= sorted(k)
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Python: for i in range(int(input())):
    temp = [int(x) for x in input().split()]
    stemp = sorted(temp)
    if stemp[2]**2 == stemp[1]**2 + stemp[0]**2:
        print('YES')
    else:
        print('NO')

Python: def triangle(a, b, c):
    return a * a + b * b == c * c

t = int(input())
for i in range(t):
    a, b, c = input().split(' ')
    a = int(a)
    b = int(b)
    c = int(c)
    r = triangle(a, b, c)
    if (r): print("YES")
    else: print("NO")