Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

Python: for i in range(int(input())):
    line = sorted(list(map(int, input().split())),reverse=True)
    print('YES' if line[0]**2==line[1]**2+line[2]**2 else 'NO')

Python: list_a=[]
list_b=[]
list_c=[]
N=int(input())
for i in range(N):
   a,b,c=map(int,input().split())
   list_a.append(a)
   list_b.append(b)
   list_c.append(c)

for i in range(N):
   list_a[i],list_b[i],list_c[i]=sorted([list_a[i],list_b[i],list_c[i]])
   x=list_a[i]
   y=list_b[i]
   z=list_c[i]
   if x**2+y**2==z**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: def ifTriangle(a, b, c):
    if a**2 + b**2 == c: print("YES")
    else: print("NO")

n=int(input())
for i in range(n):
    lines=list(map(int, input().split()))
    lines.sort()
    ifTriangle(lines[0], lines[1], lines[2])

    #ifTriangle(a, b, c)

Python: n = int(input())
for i in range(n):
    line = input()
    edges = line.split(' ')
    edges.sort()

    a = int(edges[0])
    b = int(edges[1])
    c = int(edges[2])

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

Python: def d(a):
	return int(a)

N=int(input())
answer=""
for i in range(N):
	if answer!="":
		answer+="\n"
	a=input().split()
	
	a.sort(key=d)
	if int(a[0])**2+int(a[1])**2==int(a[2])**2:
		answer+="YES"
	else:
		answer+="NO"
print(answer)

Python: for i in range(int(input())):
    data = input().split()

    length = []
    for j in range(3):
        length.append(int(data[j]))
    length.sort()

    if (length[0]**2) + (length[1]**2) == (length[2]**2):
        print("YES")
    else:
        print("NO")

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

Python: N=int(input())
i=1
t=0
while i<N+1:
    a,b,c=map(int,input().split())
    if a>b:
        t=a;a=b;b=t
    if b>c:
        t=b;b=c;c=t
    if a>b:
        t=a;a=b;b=t 
    if a*a + b*b == c*c:
        print("YES")
    else:
        print("NO") 
    i=i+1

Python: import sys

__author__ = 'bisuk'

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

# print("N = "+str(list0[0]))
#print(list0)
for i in range(1, int(list0[0]) + 1):
    #print("i="+str(i) + " :" + list0[i]),
    list2 = sorted(list0[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())
ans = []
for i in range(n):
    a = list(map(int, input().split()))
    a = sorted(a)
    if a[0]**2 + a[1]**2 == a[2]**2:
        ans.append('YES')
    else:
        ans.append('NO')
print(*ans, sep='\n')

Python: import sys
input()
for line in sys.stdin:
    a, b, c = map(int, line.split())
    d = (a + b + c) / 2
    if(a > d or b > d or c > d):
        print("NO")
    else:
        print("YES")

Python: N =  int(input())

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

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

n = int(input())

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

Python: s = int(input())

for i in range(s):
  xs = map(int, input().split())
  xs = [x*x for x in xs]
  
  if xs[0]+xs[2] == xs[1] or xs[1]+xs[0] == xs[2] or xs[2]+xs[1]==xs[0]:
    print('YES')
  else:
    print('NO')

Python: N = int(input())

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

Python: N = input()

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

Python: 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: l = []
m = []
N = int(input())
for i in range(N):
	a,b,c = map(int, input().split(" "))
	m.append(a)
	m.append(b)
	m.append(c)
	m.sort()
	if m[-1]**2 == m[-2]**2 + m[-3]**2:
		print("YES")
	else:
		print("NO")

	m = 0

Python: N = int(input())
for i in range (N):
    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: def triangle(dataset):
    a, b, c = dataset
    if a*a + b*b == c*c:
        return 1
    return 0

N = int(input())
for _ in range(N):
    dataset = sorted(map(int, input().split()))
    flag = triangle(dataset)
    print(["NO", "YES"][flag])

Python: N=int(input())
for i in range(1,N+1):
  x,y,z=sorted(map(int,input().split()))
  if x**2+y**2==z**2:
    print("YES")
  else:
    print("NO")

Python: import sys

input()
print('\n'.join('YES' if t[0] ** 2 + t[1] ** 2 == t[2] ** 2 else 'NO' for t in
                [sorted(map(int, l.split())) for l in sys.stdin]))

Python: n = int(input())

for i in range(n):
    s = list(map(int, input().split()))
    s.sort()
    if(s[2] ** 2 == s[1] ** 2 + s[0] ** 2):
        print('yes')
    else:
        print('no')

Python: import sys
a = []
for line in sys.stdin:
    a.append(line)
for i in a:
    sum = i[0] + i[1]
    print(len(str(sum)))

Python: #!/usr/bin/env python
# coding: utf-8


def is_right_triangle(a, b, c):
    return a ** 2 + b ** 2 == c ** 2


def main():
    input_count = int(raw_input())
    for i in xrange(input_count):
        L = raw_input().split(" ")
        L = map(long, L)
        L.sort()
        print ("N0", "YES")[is_right_triangle(*L)]

if __name__ == '__main__':
    main()

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: N=int(input())
for n in range(N):
	sides = list(map(int,input().split()))
	sides.sort()
	if sides[-1] < sides[-2]+sides[-3]:
		print("YES")
	else:
		print("NO")