Go: package main
import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "sort"
)
 
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
 
func main(){
    sc.Split(bufio.ScanWords)
    defer out.Flush()
    n := nextInt()
    for i:=0; i<n; i++{
        data := nextInts(3)
        sort.Ints(data)
        if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
            fmt.Fprintln(out, "YES")
        }else{
            fmt.Fprintln(out, "NO")
        }
    }
}
 
func next() string{
    sc.Scan()
    return sc.Text()
}
 
func nextInt() int{
    a, _ := strconv.Atoi(next())
    return a
}
 
func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

Python: if __name__ == "__main__":
    n = int(input().strip().split()[0])
    for i in range(n):
        data = list(map(int,input().strip().split()))
        c = max(data)
        data.remove(c)
        a,b = data
        if a **2 + b ** 2 == c**2 :print("YES")
        else:print("NO")

Python: for i in range(input()):
    a=map(int,raw_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):
    sides = list(map(int, input().split()))
    sides.sort()
    if sides[0] ** 2 + sides[1] ** 2 == sides[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: N=int(input())
for i in range(N):
    x,y,z=map(int,input().split())
    if x**2+y**2==z**2 or x**2+z**2==y**2 or z**2+y**2==x**2:
        print("YES")
    else:
        print("NO")

Python: N = int(input())
ans = []
for i in range(N):
    a, b, c = map(int, input().split())
    if c**2 == a**2+b**2:
        ans.append("YES")
    else:
        ans.append("NO")
for i in range(N):
    print(ans[i])

Python: def tri(a,b,c):
	return a**2 == b**2 + c**2
for time in range(int(input())):
	x,y,z = [int(i) for i in input().split()]
	if tri(x,y,z) or tri(y,z,x) or tri(z,x,y):
		print("YES")
	else:
		print("NO")

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

if __name__ == '__main__':
    main()

Python: for i in range(int(input())):
    a = [int(i) for i in 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(1,n+1):
    a,b,c=map(int,input().split())
    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: 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: def main():
    n = int(input())
    while True:
        try:
            li = [int(i) for i in input().split()]
            li = sorted(li)
            for x in li:
                tmp = x.split(" ")
                for i in range(len(tmp)):
                    tmp[i] = int(tmp[i])
                tmp = sorted(tmp)
                a,b,c = tmp[0],tmp[1],tmp[2]
                if (a**2 + b**2) == c**2:
                    print("YES")
                else:
                    print("NO")
        except EOFError:
            break
    return None

if __name__ == '__main__':
    main()

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

Python: n = int(input())

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

Python: def judgeTriangle(a, b, c):
    if c * c == a * a + b * b:
        result = 'YES'
    else:
        result = 'NO'
    return result


for i in range(int(input())):
    numList = list(map(int, input().split()))
    numList.sort()
    a, b, c = numList
    print(judgeTriangle(a, b, c))

Python: i=int(input())
for j in range(i):
    a,b,c=map(int,input().split())
    d=[a,b,c]
    list=sorted(d)
    x=int(list[0])
    y=int(list[1])
    z=int(list[2])
    if x**2+y**2==z**2:
        print("YES")
    else:
        print("NO")

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

Python: import sys

n = int(input())
print(n)
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: 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 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):
    l = list(map(int,input().split()))
    l.sort()
    if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]: print("YES")
    else: print("NO")

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

def get_input():
    for i in range(int(input())):
        yield "".join(input())

if __name__ == "__main__":
    array = list(get_input())
    
    for i in range(len(array)):        
        a,b,c = array[i].split()
        if int(a)**2 + int(b)**2 == int(c)**2:
            print(u"YES")
        elif int(c)**2 + int(a)**2 == int(b)**2:
            print(u"YES")
        elif int(b)**2 + int(c)**2 == int(a)**2:
            print(u"YES")
        else:
            print(u"NO")

Python: i=int(input())
for j in range(i):
    a,b,c=map(int,input().split())
    d=[a,b,c]
    list=sorted(d)
    x=int(list[0])
    y=int(list[1])
    z=int(list[2])
    if x**2+y**2==z**2:
        print("YES")
    else:
        print("NO")

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

Python: import sys
import math

for line in sys.stdin:
  a = line.split()
  if len(a) == 3:
    if (int(a[0])*int(a[0]) + int(a[1])*int(a[1])) == int(a[2])*int(a[2]) or (int(a[0])*int(a[0]) + int(a[2])*int(a[2])) == int(a[1])*int(a[1]) or (int(a[2])*int(a[2]) + int(a[1])*int(a[1])) == int(a[0])*int(a[0]):
    
        print("YES")
    else:
        print("NO")

Python: import sys
n = int(sys.stdin.readline())
for i in range(n):
    sides = [int(k) for k in sys.stdin.readline().split()]
    sides.sort()
    if sides[0] ** 2 + sides[1] ** 2 == sides[2] ** 2:
        print("YES")
    else:
        print("NO")

Python: def tri(a,b,c):
	return a^2 == b^2 + c^2
for time in range(int(input())):
	x,y,z = [int(i) for i in input().split()]

Python: import sys

i = 0
list = []
for line in sys.stdin.readlines():
    # list1 = line.split(" ")
    list.append(line)
    # list.append(int(line.strip("\n")))

# print("N = "+str(list[0]))
#print(list)
for i in range(1, int(list[0]) + 1):
    #print("i="+str(i) + " :" + list[i]),
    list2 = sorted(list[i].strip("\n").split(" "))
    #print(list2)
    if int(list2[0]) * int(list2[0]) + int(list2[1]) * int(list2[1]) == int(list2[2]) * int(list2[2]):
        print("YES")
    else:
        print("NO")

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

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