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: 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()])]]

Python: number = int(input())

for i in range(number):
  tri = list(map(int, input().split(" ")))

  print(str(tri[0]))
  print(str(tri[1]))
  print(str(tri[2]))

  if tri[0] > tri[1]:
    buf = tri[0]
    tri[0] = tri[1]
    tri[1] = buf
  if tri[1] > tri[2]:
    buf = tri[1]
    tri[1] = tri[2]
    tri[2] = buf
  if tri[0] * tri[0] + tri[1] * tri[1] == tri[2] * tri[2]:
    print("YES")
  else:
    print("NO")

Python: num = int(input())
output = []
data = []

for x in range(num):
    data = input().split()
    for y in range(len(data)):
        data[y] = int(data[y])
    data.sort()
    if data[2]**2 == data[1]**2 + data[0]**2:
        output.append("YES")
    else:
        output.append("NO")

for x in range(num):
    print(output[x])

Python: T = int(input())
for x 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: import math

def main():

    data_count = int(input())
    data = [tuple(map(int, input().split())) for i in range(data_count)]

    for item in data:
        print('YES') if math.hypot(item[0], item[1]) == float(item[2]) else print('NO')


main()

Python: times=int(input())
answers=[]
for i in range(times):
    hen=[]
    hen=input().split()
    for j in range(3):
        hen[j]=int(hen[j])
    for j in range(2):
        for k in range(2):
            if hen[j]>hen[j+1]:
                num=hen[j]
                hen[j]=hen[j+1]
                hen[j+1]=num
    if hen[0]*hen[0]+hen[1]*hen[1]==hen[2]*hen[2]:
        answers.append('Yes')
    else:
        answers.append('No')
for i in range(len(answers)):
    print(answers[i])

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

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]*l[0]+l[1]*l[1]==l[2]*l[2]:
		print("YES")
	else:
		print("NO")

Python: a = int(input())
b = int(1)
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if x[0]**2 + x[1]**2 == x[2]**2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break