Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

Python: N = int(raw_input())

for i in range(N):
    line = raw_input()
    a, b, c = sorted(int(w) for w in line.split())

    if a**2 + b**2 == c**2:
        print('YES')
    else:
        print('NO')

Python: import sys

n = input()
for a,b,c in map(lambda x: map(int,x.split()),sys.stdin.readlines()):
    print("YES" if a*a+b*b==c*c else "NO")

Python: def triangle(a, b, c):
    return a * a + b * b == c * c

t = int(input())
for i in range(t):
    sides = input().split(' ')
    for i in range(3):
        sides[i] = int(sides[i])
    sides.sort()
    r = triangle(sides[0], sides[1], sides[2])
    if (r): print("YES")
    else: print("NO")

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

Python: def Triangle(a,b,c):
    if a**2 == b**2 +c**2 or b**2 == a**2+c**2 or c**2 == a**2+b**2:
        print("YES")
    else:
        print("NO")

N = int(input())
for i in range(N):
    a,b,c = map(int,input().split())
    Triangle(a,b,c)

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

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

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

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

Python: x=int(input())
list=[]
for i in range(x):
    a,b,c=input().split()
    list.append((int(a),int(b),int(c)))
    a=int(a)
    b=int(b)
    c=int(c)
    if a*a==b*b+(c*c):
         print('YES')
    elif b*b==a*a+(c*c):
        print('YES')
    elif c*c==a*a+(b*b):
        print('YES')
    else:
        print('NO')

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

import sys
import os

N = int(input())
for i in range(N):
    lst = list(map(int, input().split()))
    mx = max(lst)
    lst.remove(mx)

    if mx * mx == lst[0] * lst[0] + lst[1] * lst[1]:
        print('YES')
    else:
        print('NO')

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

Python: import sys
l = sys.stdin.readlines ()
del l[0] # Delete number represents the number of detasets.
for line in l:
    data = map (int, line.split (" "))
    data.sort(reverse=True)
    if data[0]**2 == data[1]**2 + data[2]**2:
        print ("YES")
    else: print ("NO")

Python: tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    tri_list = 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: import sys
next(sys.stdin)
for i in sys.stdin:
    a, b, c = sorted(list(map(int, i.split())))
    print("yes" if a*a+b*b == c*c else "no")

Python: #import math

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

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

Python: N = int(input())
for i in range(N):
    a = [int(i) for i in input().split()]
    a.sort(reverse=True)
    if a[0]**2 == a[1]**2+a[2]**2:
        print('YES')
    else:
        print('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')