Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

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

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")