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

Python: #! /usr/bin/env python3.4
import sys

N = int(sys.stdin.readline())
ans = []
for i in range(N):
    tri = sys.stdin.readline()[:-1].split(' ', 3)
    newlist = []
    for n in tri:
        newlist.append(int(n))
    newlist.sort()
    if newlist[0]*newlist[0] + newlist[1]*newlist[1] == newlist[2]*newlist[2]:
        ans.append("YES")
    else:
        ans.append("NO")
for a in ans:
    print(a)

Python: import sys

n = input()

for _ in range(int(n)):
  a, b, c = sorted(map(int, sys.stdin.readline().split()))
  if a * a + b*b == c* c:
    print("YES")
  else:
    print("NO")

Python: import sys;

for line in sys.stdin:
	n = int(line);
	for i in range(0, n):
		a = [int(num) for num in input().split()];
		a.sort();
		if a[2] ** 2 == (a[0] ** 2) + (a[1] ** 2):
			print('YES');
		else:
			print('NO');

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

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

Python: n=int(input())
for i in range(n):
    a=list(map(int, input().split()))
    a.sort()
    if a[2]**2 == a[1]**2+a[0]**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: N=int(input())
i=0
while i<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')
    i+=1

Python: r=int(input())

for x in range(r):
    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: input_num = int(input())

for i in range(input_num):
    sides = list(map(int, input().split()))
    sides.sort()
    a, b, c = sides
    if a*a + b*b == c*c:
        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())
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(int, L)
        print ("N0", "YES")[is_right_triangle(L)]


if __name__ == '__main__':
    main()

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

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

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

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

Python: N = int(input())

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

Python: 
N = input()

a = []
for i in range(int(N)):
    s = input().split()
    ss = [int(s[0]), int(s[1]), int(s[2])]
    ss.sort()

    if ss[2]**2 == ss[0]**2 + ss[1]**2:
        print("YES")
    else:
        print("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 b*b==a*a+c*c or c*c==b*b+a*a):
        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: 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: n = int(input())
ans = []

for _ in range(n):

    l = list(map(int, input().split()))
    l.sort()
    a = l[0]
    b = l[1]
    c = l[2]

    if c**2 == a**2 + b**2:
        ans.append("YES")
    else:
        ans.append("NO")


for a in ans:
    print(a)

Python: N = int(input())
for i in range(N):
    a, b, c = map(int, input().split())
    d = (a + b + c) / 2
    if(a > d or b > d or c > d):
        print("NO")
    else:
        print("YES")

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

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

Python: n = int(input())

for i in range(n):
    a,b,c = map(int,input().split(" "))
    if a**2 == b**2 + c**2:
        print("Yes")
    elif b**2 == a**2 + c**2:
        print("Yes")
    elif c**2 == a**2 + b**2:
        print("Yes")
    else:
        print("No")

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

if __name__ == '__main__':
    main()

Python: # -*- coding: utf-8 -*-
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: t = int(input())
i = 0
def Right_Tri(m,n,o):
    a = (n**2+o**2)**(0.5)
    if m == a:
        return True

while(i<t):
    m,n,o = map(int, input().split())
    if (Right_Tri(m,n,o) or Right_Tri(n,o,m) or Right_Tri(o,m,n) == True):
        print("YES")
    else:
        print("NO")
    i += 1