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: class triangle():
    def __init__(self,a,b,c):
        self.a = a
        self.b = b
        self.c = c

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

        if a+b == c:
            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())
i=1

while i<=n:
    a,b,c=map(int, input().split())
    if a<b:
        a,b=b,a
    if a<c:
        a,c=c,a
    if a**2==b**2+c**2:
        print("YES")
    else:
        print("NO")
    
    i+=1

Python: N=int(input())

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

Python: N=int(input())

for i in range(1,N+1) :
    x,y,z = map(int,input().split())
    X=max(x,y,z)
    Y=min(x,y,z)
    Z=x+y+z-X-Y
    if X**2==Y**2+Z**2:
        print("YES")
    else :
        print("NO")

Python: N = int(input())
for i in range(N):
    a = list(map(int, input().split()))
    a = sorted(a)
    x,y,z = a[0],a[1],a[2]
    if x**2 + y**2 == z**2:
        print("yes")
    else:
        print("no")

Python: import sys

for line in sys.stdin:
   try:
      array = [int(x) for x in line.split()]
      array.sort()
      if array[2]**2 == (array[0]**2+array[1]**2):
         print('YES')
      else:
         print('NO')
   except(ValueError):
      continue

Python: n = int(input())
L = [input() for i in range(n)]
for line in L:
	A = line.split()
	B = sorted([int(A[i]) for i in range(3)])
	if B[2]^2 == B[0]^2 + B[1]^2:
		print('YES')
	else:
		print('NO')

Python: n=int(input())
for i in range(n):
    a,b,c = input().split()
    x = int(a)
    y = int(b)
    z = int(c)
    p = [x,y,z]
    p.sort()
    if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
        print('YES')
    else:
        print('NO')

Python: # AOJ 0003 Is it a Right Triangle?
# Python3 2018.6.7 bal4u

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

if __name__ == '__main__':
    main()

Python: # coding: utf-8
# Your code here!

N = int(input())
for i in range(N):
   a, b, c = map(int, input().split())
   if a > b:
      a, b = b, a
   if b > c:
      b, c = c, b
   if a > b:
      a, b = b, a
   if c * c - a * a - b * b == 0:
      print("YES")
   else:
      print("NO")

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

Python: import sys
import math

for line in sys.stdin:
  a = line.split()
  if len(a) == 3:
    print ("YES" if int(a[0])*int(a[0]) + int(a[1])*int(a[1]) == int(a[2])*int(a[2]) else "NO")

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

Python: a=int(input())

for _ in range(a):
    x,y,z=sorted(list(map(int,input().split())))
    print("YES" if x**2+y**2==z**2 else "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: def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list)

def check_tri(len_list):
	import itertools
	import math

	flag = False
	for tmp in list(itertools.permutations(len_list)):
		if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	if flag == True:
		print('YES')
	else:
		print('NO')

if __name__ == '__main__':
	main()

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

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

Python: for i in range(int(input())):
    a,b,c=sorted([int(i) for i in input().split()])
    print('YES' if a**2+b**2==c**2 else '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 a*a+c*c==b*b or b*b+c*c==a*a:
        print("YES")
    else :
        print("NO")

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

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

Python: #! /usr/bin/python3

a=int(input())

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

Python: import math
import itertools

for i in range(int(input())):
    a, b, c = sorted(map(int, input().split()))
    print('YES' if a*a+b*b==c*c else '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 b**2 == c**2 + a**2 or c**2 == a**2 + b**2 :
        print("YES")
    else :
        print("NO")

Python: # coding: utf-8
n = int(input())
for i in range(n):
    a,b,c = list(map(int,input().split()))
    if a*a == b*b + c*c or b*b == c*c + a*a or c*c == a*a + b*b:
        print("YES")
    else:
        print("NO")

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

Python: N = int(input())

i = 0

while True:
    a = list((int(x) for x in input().split()))
    a.sort()

    i += 1

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

    if i == N:
        break