Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

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

Python: import sys

for line in sys.stdin:
    try:
        a,b,c = [int(x) for x in line.split()]
        if (a**2+b**2) == c**2:
            print('YES')
        elif (a**2+c**2) == b**2:
            print('YES')
        elif (b**2+c**2) == a**2:
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

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

Python: 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 a < c and b < c:
        a2 = a ** 2
        b2 = b ** 2
        c2 = c ** 2
        if (a2 + b2) == c2:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Python: N = int(input())
ans = []

for i in range(N) :
    a, b, c = sorted(list(map(int, input().split())))
    if a ** 2 + b ** 2 == c ** 2 :
        ans.append("YES")
    else :
        ans.append("NO")
        
for a in ans :
    print(a)

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

N = int(input())

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

Python: N = int(input())
i=0
while i < N:
 x,y,z = map(int,input().split())
 if x<=z and y<=z: 
     if z**2 == x**2+y**2: print("YES")
     else: print("NO")
 elif x<=y and z<=y:
     if y**2 == x**2+z**2: print("YES")
     else: print("NO")
 else: 
     if x**2 == y**2+z**2: print("YES")
     else: print("NO")

 i += 1

Python: def main():
    n = int(input())
    n.sort()
    if n[0]**2+n[1]**2 != n[2]**2:
        print("NO")
    else:
        print("YES")

main()

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

Python: #1???????????????
num_data = int(input())


for i in range(num_data):
    input_line = input().split(" ")
    
    a = int(input_line[0])
    b = int(input_line[1])
    c = int(input_line[2])
    
    #?????????????????????????????????????????§
    if (pow(a,2) + pow(b,2) == pow(c,2) ) or (pow(a,2) + pow(c,2) == pow(b,2) ) or (pow(b,2) + pow(c,2) == pow(a,2)):  
        print("YES")
    else:
        print("NO")

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