Go: package main

import "fmt"

func main() {
	var n int

	fmt.Scanf("%d", &n)

	var a, b, c int
	for i := 0; i < n; i++ {
		var isTriangle bool
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a {
			isTriangle = true
		}

		if isTriangle == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

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

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

Python: n=int(input())
for i in range(n):
    c,d,b=map(int,input().split())

    if c*c+d*d==b*b or c*c+b*b==d*d or b*b+d*d==c*c:
        print("YES")
    else:
        print("NO")

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

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

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

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(int, L)
        print ("N0", "YES")[is_right_triangle(L)]

if __name__ == '__main__':
    main()

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

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

Python: n=int(input())
for i in range(n):
    A,B,C=map(int,input().split())
    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')

Python: N=int(input())
for i in range(N):
    a,b,c=input().split()
    a=int(a)
    b=int(b)
    c=int(c)
    
    X=int(max(a,b,c))
    Y=int(min(a,b,c))
    Z=int(a+b+c-X-Y)
    
    if X**2 == Y**2 + Z**2:
        print("YES")
    else:
        print("NO")

Python: while True:
    n = int(input())
    if n <= 1000:
        break

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

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

for i in range(N):
    A = list(map(int, input().split()))
    chk_Num = sorted(A, reverse=True)
    if (chk_Num[1] ** 2 + chk_Num[2] ** 2) == (chk_Num[0] ** 2):
        result.append("YES")
    else:
        result.append("NO")

for i in result:
    print(i)

Python: def main():
    def inputs():
        
        li = []
        count = 0
        try:
            N = input()
            while count < int(N):
                li.append(input())
                count += 1
        except EOFError:
            return li
        return li

    li = inputs()
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = int(tmp[0]),int(tmp[1]),int(tmp[2])
        if c**2 == a**2 + b**2:
            print("YES")
        else:
            print("NO")

    return None

Python: N = int(input())

for i in range(N):
    sides = sorted(list(map(int, input().split())))
    if sides[0]**2 + sides[1]**2 == sides[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())
    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 run():
    n = int(input())
    data = []
    for _ in range(n):
        data.append(list(map(int, input().split())))

    for d in data:
        _data = d[:]
        mx = max(_data)
        _data.remove(mx)
        if mx**2 == sum([x**2 for x in _data]):
            print('YES')
        else:
            print('NO')
        

if __name__ == '__main__':
    run()

Python: num = int(input())
for i in range(num):
    a, b, c = map(int, input().split())
    a2 = a ** 2
    b2 = b ** 2
    c2 = c ** 2
    if a2 + b2 == c2 or a2 + c2 == b2 or c2 + b2 == a2 :
        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, b, c = sorted(map(int, input().split()))
    print("YES" if a**2 + b**2 == c**2 else "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("YES")
        elif int(c)^2 + int(a)^2 == int(b)^2:
            print("YES")
        elif int(b)^2 + int(c)^2 == int(a)^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: 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())
while True:
    try:
        a=list(map(int,input().split()))
        if a[0]**2+a[1]**2==a[2]**2:
            print('YES')
        elif a[1]**2+a[2]**2==a[0]**2:
            print('YES')
        elif a[2]**2+a[0]**2==a[1]**2:
            print('YES')
        else:
            print('NO')
    except:
        break;

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

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