Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

Python: # coding: utf-8
# Your code here!

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())
data = [sorted(map(int, input().split(' '))) for i in range(n)]

for d in data:
    if d[0]**2 + d[1]**2 == d[2]**2:
        print('YES')
    else:
        print('NO')

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

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

Python: import sys

array = []

for line in sys.stdin:
    try:
        array = [int(x) for x in line.split()]
        array.sort()
        if array[2]**2 == (array[0]**2+array[1]**2):
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

Python: for _ in[0]*int(input()):
 a,b,c=map(int,sorted(input().split()))
 print(['No','Yes'][a*a+b*b==c*c])

Python: N = int(input())
for i in range(N):
    p = input()
    li = sorted([int(i) for i in p.split(" ")])
    if li[-1]**2 == li[-2]**2 + li[-3]**2:
        print("YES")
    else:
        print("NO")

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

Python: num=int(input())
numbers=[]
for i in range(num):
    numbers.append(i)
    numbers[i]=[int(k) for k in input().split()]
    numbers[i]=sorted(numbers[i])

for i in range(num):
    if numbers[i][0]^2+numbers[i][1]^2==numbers[i][2]^2:
        print('YES')
    else:
        print('NO')

Python: import sys

datasets = int(input())

for _ in range(datasets):
    data = list(map(int, input().strip().split(" ")))
    data.sort()
    if data[0]*data[0] + data[1]*data[1] == data[2]*data[2]:
        print("YES")
    else:
        print("NO")

Python: def is_triangle(x, y, z):
    x, y, z = sorted(x, y, z)
    return x**2 + y**2 == z**2

num = int(input())
for i in range(num):
    x, y, z = map(int, input().split())
    triangle = is_triangle(x, y, z)
    if triangle:
        print('YES')
    else:
        print('NO')

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

Python: n = int(input())
ans = list()

for i in range(n):
    line = input().split(" ")
    if (line[0] == line[1]) or (line[1] == line[2]) or (line[0] == line[2]):
        ans.append("YES")
    else:
        ans.append("NO")

for j in range(n):
    print(ans[j])

Python: def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list)

def check_tri(len_list):
	import itertools
	flag = True
	for tmp in list(itertools.permutations(len_list)):
		if (tmp[0] + tmp[1]) < tmp[2]:
			flag = False
			break

	if flag == True:
		print('yes')
	else:
		print('no')

if __name__ == '__main__':
	main()

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

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):
    hen = input().split()
    hen1, hen2, hen3 = map(int, hen)
    if hen1 == hen2 == hen3:
        print('NO')
    else:
        print('YES')

Python: N=int(input())
while 1:
    a,b,c=map(int,input().split())
    A=a**2
    B=b**2
    C=c**2
    for i in len(N):
        if A+B==C:
            print('YES')
        elif A+C==B:
            print('YES')
        elif B+C==A:
            print('YES')
        else:
            print('NO')

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

Python: for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

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

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: 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())
    d=[a,b,c]
    d=sorted(d)

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

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