Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		for i, c := range strings.Split(sc.Text(), " ") {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		sort.IntSlice(edges).Sort()
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

Python: import sys
import math

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

Python: import sys
n = int(sys.stdin.readline())
for i in range(n):
    sides = [int(k) for k in sys.stdin.readline().split()]
    sides.sort()
    if sides[0] ** 2 + sides[1] ** 2 == sides[2] ** 2:
        print("YES")
    else:
        print("NO")

Python: def tri(a,b,c):
	return a^2 == b^2 + c^2
for time in range(int(input())):
	x,y,z = [int(i) for i in input().split()]

Python: import sys

i = 0
list = []
for line in sys.stdin.readlines():
    # list1 = line.split(" ")
    list.append(line)
    # list.append(int(line.strip("\n")))

# print("N = "+str(list[0]))
#print(list)
for i in range(1, int(list[0]) + 1):
    #print("i="+str(i) + " :" + list[i]),
    list2 = sorted(list[i].strip("\n").split(" "))
    #print(list2)
    if int(list2[0]) * int(list2[0]) + int(list2[1]) * int(list2[1]) == int(list2[2]) * int(list2[2]):
        print("YES")
    else:
        print("NO")

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

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

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

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

Python: #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
	num = int(input())
	for i in range(num):
		tri = [int(x) for x in input().split(" ")]
		tri.sort()
		if tri[2] ** 2 == tri[0] ** 2 + tri[1] ** 2:
			print("YES")
		else:
			print("NO")
			
if __name__ == '__main__':
  main()

Python: x=int(input())
for i in range(x):
    a, b, c=list(map(int ,input().split()))
    s=[a**2,b**2,c**2]
    t=sorted(s)
    if t[0]+t[1]==t[2]:
        print("YES")
    else:
        print("NO")

Python: loop_len = int(input())
import math
for i in range(loop_len):
    l=list(map(int,input().split()))
    if math.hypot(l[0],l[1])==l[2]:
        print('YES')
    elif math.hypot(l[1],l[2])==l[0]:
        print('YES')
    elif math.hypot(l[2],l[0])==l[1]:
        print('YES')
    else:
        print('NO')

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

Python: n = int(input())
for i in range(n):
    li = sorted([int(j) for j in input().split()])
    print("Yes" if li[0] ** 2 + li[1] ** 2 == li[2] ** 2 else "No")

Python: N=int(input())
for i in range(1,N+1):
    x,y,z=input().split()
    x=int(x)
    y=int(y)
    z=int(z)
    if x>y:
        x,y=y,x
    if y>z:
        y,z=z,y
    if x>y:
        x,y=y,x
    if x*x+y*y==z*z:
        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: N=int(input())
for i in range(N):
    a=list(map(int,input().split()))
    a.sort()
    if a[2]*a[2]==a[1]*a[1]+a[0]*a[0]:
        print("YES")
    else:
        print("NO")

Python: tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    k = int(input())
    tri_list = list(k.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: N = int(input())
for i in range(N):
  a, b, c = sorted(map(int, input().split()))
  if a*a + b*b == c*c:
    print("YES")
  else:
    print("NO")

Python: n=int(input())

for i in range(n):
    s = input().rstrip().split(' ')
    s.sort()
    s0 = int(s[0])
    s1 = int(s[1])
    s2 = int(s[2])
    a = s0**2+s1**2
    if (a == s2**2) :
        print("Yes")
    else:
        print("No")

Python: #!/usr/bin/env python3
def right_triangle(edge):
    # a < b < c
    return (edge[0] ** 2 + edge[1] ** 2 == edge[2] ** 2)

n = int(input())
for i in range(n):
    edge = sorted([int(x) for x in input().split()])
    if right_triangle(edge):
        print("YES")
    else:
        print("NO")

Python: #!/usr/bin/env python
# coding: utf-8


def is_right_triangle(L):
    L.sort()
    return L[0] ** 2 + L[1] ** 2 == L[2] ** 2


def main():
    input_count = int(raw_input())
    inputs = []
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(int, L)
        inputs.append(L)

    for L in inputs:
        print ("N0", "YES")[is_right_triangle(L)]


if __name__ == '__main__':
    main()

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

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

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

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

Python: import sys

n = int(input())
for i in range(n):
    line = sys.stdin.readline()
    lengths = list(map(int, line.strip().split()))
    if lengths[0] == lengths[1] == lengths[2]:
        print('YES')
    else:
        print('NO')

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

Python: T = int(input())

for tc in range(0,T) :
    a=sorted(map(int,input().split(" ")))
    if a[0]**2+a[1]**2==a[2]**2 :
        print("YES")
    else:
        print("NO")

Python: n = int(input())

for i in range(n):
    l = list(map(int,input().split()))
    l.sort()
    if l[0] ** 2 + l[1] ** 2 == l[2] ** 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: N=int(input())
answer=""
for i in range(N):
	if answer!="":
		answer+="\n"
	a=map(int,input().split())
	a.sort()
	if a[0]**2+a[1]**2==a[2]**2:
		answer+="YES"
	else:
		answer+="NO"
print(answer)

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