Go: package main

import "fmt"

func main() {
	var n int

	fmt.Scanf("%d", &n)

	var a, b, c int
	for i := 0; i < n; i++ {
		var isTriangle bool
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a {
			isTriangle = true
		}

		if isTriangle == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

Python: for i in range(int(input())):
	values = sorted(map(lambda x: int(x)^2, raw_input().split()))
	if values[2] == values[1] + values[0]:
		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(long, L)
        print ("N0", "YES")[is_right_triangle(L)]

if __name__ == '__main__':
    main()

Python: # -*- coding:utf-8 -*-

def check(val):
    val.sort()
    a=int(val[0])*int(val[0])
    b=int(val[1])*int(val[1])
    c=int(val[2])*int(val[2])

    flag=(c==a+b)
    return flag

def main():
    N=input()

    while True:
        try:
            a=input()
            val=a.split(" ")
            if check(val):
                print("YES")

            else:
                print("NO")
        except (EOFError,ValueError):
            break

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

Python: n=int(input())
for i in range(n):
    a,b,c=map(int, input().split())
    if a > b+c and b > c+a and c > b+a:
        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: import sys

n = input()

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

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

Python: n=input()

for i in range(n):
     x=[input(),input(),input()]
     x.sort()
     if x[0]**2+x[1]**2==x[2]**2: print("YES")
     else: print("NO")

Python: N = int(input())
for i in range(N):
	l = []
	line = raw_input()
	l.append(int(line.split()[0]))
	l.append(int(line.split()[1]))
	l.append(int(line.split()[2]))
	l.sort()
	if l[0]**2+l[1]**2==l[2]**2:
		print("YES")
	else:
		print("NO")

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: N = int(input())

for i in range(N):
    adjacent_side_1, adjacent_side_2, hypotenuse = sorted(list(map(int, input().split())))
    if adjacent_side_1**2 + adjacent_side_2**2 == hypotenuse**2:
        print('YES')
    else:
        print('NO')

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

Python: d=input()
for a in range(int(d)):
    a,b,c=map(int,input().split())
    if(max(a,b,c)*2>=a+b+c):
        print(False)
    else:
        print(True)

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: 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: [print("YES"if e else"NO")for e in[int(ln.split()[0])**2+int(ln.split()[1])**2==int(ln.split()[2])**2for ln in __import__("sys").stdin]]

Python: for _ in range(int(input())):
    a = [int(i) for i in input().split()]
    print('YES')  if a[0]**2 + a[1]**2 + a[2] ** 2 - max(a) **2 == max(a) ** 2 else print('NO')

Python: import sys;
#from me.io import dup_file_stdin

#@dup_file_stdin
def solve():
    n=int(sys.stdin.readline())
    for i in range(n):
        x=[int(num) for num in sys.stdin.readline().split(' ')]
        x.sort();
        if(x[0]**2+x[1]**2==x[2]**2): print("YES")
        else :print("NO")
solve()

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

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

Python: for i in range(0, int(input())):
    sidelen = [int(j) for j in input().split(" ")]
    sidelen.sort(reverse=True)
    if(sidelen[0]**2 == sidelen[1]**2 + sidelen[2]**2):
        print("YES")
    else:
        print("NO")

Python: cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if int(z ** 2) == int(x ** 2) + int(y ** 2):
        print('YES')
    else:
        print('NO')

Python: N = input()
a = []
answer_list = []

for i in range(N):
    a.append(map(int, raw_input().strip().split()))

for j in range(len(a)):
    number_1 = a[j][0]
    number_2 = a[j][1]
    number_3 = a[j][2]

    number_1_mul = number_1 ** 2
    number_2_mul = number_2 ** 2
    number_3_mul = number_3 ** 2

    if number_1_mul == number_2_mul + number_3_mul:
        print("YES")
    if number_2_mul == number_3_mul + number_1_mul:
        print("YES")
    if number_3_mul == number_1_mul + number_2_mul:
        print("YES")

    else:
        print("NO")

Python: 
N = int(input())
A = []
B = []
C = []#最長辺
for i in range(N):
    a, b, c = map(int, input().split())
    if(a > b):#a,bを昇順に並び替える
        t = a
        a = b
        b = t
    if(b > c):#b,cを昇順に並び替える
        t = b
        b = c
        c = t
    A.append(a)
    B.append(b)
    C.append(c)
for i in range(N):
    if(A[i]**2 + B[i]**2 == C[i]**2):
        print("YES")
    else:
        print("NO")

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

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

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