Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

Python: import sys
for i in sys.stdin:
    try:
        sidelen = [int(j) for j in i.split(" ")]
        sidelen.sort(reverse=True)
        if(sidelen[0]**2 == sidelen[1]**2 + sidelen[2]**2):
            print("YES")
        else:
            print("NO")
    except:
        continue

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

Python: # Aizu Problem 0003: Is it a Right Triangle?
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


N = int(input())
for __ in range(N):
    a, b, c = sorted([int(_) for _ in input().split()])
    print("YES" if c**2 == a**2 + b**2 else "NO")

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

Python: # AOJ通らなかった...何故かはわからん
N = int(input())
for i in range(N):
    a = list(map(int, input().split(" ")))
    a.sort
    #print(a)
    if(a[2]**2 == a[0]**2 + a[1]**2):
        print("YES")
    else:
        print("NO")

Python: for i in range(int(input())):
    a, b, c = sorted([int(i) for i in 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[0] ** 2 + a[1] ** 2 == a[2] ** 2:
        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: # -*- coding:utf-8 -*-

import sys

array = []
for i in sys.stdin:
    array.append(i)

N = int(array[0])
for k in range(1,N+1):
    x = array[k].split()
    a, b, c = int(x[0]), int(x[1]), int(x[2])
    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: import sys
size = int(sys.stdin.readline())
for i in range(size):
    line = sys.stdin.readline()
    line = line.split(" ")
    inp = []
    for j in line:
        inp.append(int(j))
    inp.sort()
    if (inp[0]**2+inp[1]**2==inp[2]**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[0]**2 + a[1]**2 == a[2]**2:
        print("YES")
    
    else:
        print("NO")

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

Python: [print("YES" if y[0] + y[1] == y[2] else "NO") for y in [sorted([int(x)**2 for x in input().split()]) for _ in range(int(input()))]]

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

Python: for _ in range(int(input())):
  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):
    tri_list = list(map(int,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: 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: while True:
    try:
        s=input().split(" ")
        s=[int(j) for j in s]
        s.sort()
        
        if(s[0]**2+s[1]**2==s[2]**2):
            print("YES")

        else:
            print("NO")
        

    except:
        break

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

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

Python: n = int(input())
for _ in range(n):
    edges = sorted([int(i) for i in input().split()])
    if edges[0] ** 2 + edges[1] ** 2 == edges[2] ** 2:
        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

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

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: N = int(input())
while N > 0:
    es = sorted(list(map(int, input().split())))
    if es[2] ** 2 == es[1] ** 2 + es[0] ** 2:
        print('YES')
    else:
        print('NO')
    N -= 1