Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

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

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

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

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

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