Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)

Python: import sys

def is_right(edges):
    max_len = max(edges)
    edges.remove(max_len)
    return max_len ** 2 == edges[0] ** 2 + edges[1] ** 2
    
num = int(sys.stdin.readline().strip())

for i in range(num):
    data = sys.stdin.readline().strip().split(' ')
    a = int(data[0])
    b = int(data[1])
    c = int(data[2])
    if is_right([a, b, c]):
        print('YES')
    else:
        print('NO')

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

Python: answers=[]
for i in range(int(input())):
    hen=[]
    hen=input().split()
    for j in range(3):
        hen[j]=int(hen[j])
    for j in range(2):
        for k in range(2):
            if hen[j]>hen[j+1]:
                num=hen[j]
                hen[j]=hen[j+1]
                hen[j+1]=num
    if hen[0]*hen[0]+hen[1]*hen[1]==hen[2]*hen[2]:
        answers.append('Yes')
    else:
        answers.append('No')
for i in range(len(answers)):
    print(answers[i])

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):
    a = sorted([int(x) for x in input().split()])
    if a[0] ** 2 + a[1] ** 2 == a[2] ** 2:
        print('YES')
    else:
        print('NO')

Python: import sys

N = int(sys.stdin.readline().rstrip())
for i in range(N):
    l1,l2,l3 = sorted(map(int, sys.stdin.readline().rstrip().split(' ')))
    print("YES" if (l1**2 + l2**2 == l3**2) else "NO")

Python: cnt = int(input())
values = []
for i in range(cnt):
    values.append([int(x) for x in input().split()])

for x, y, z in values:
    if z ** 2 == x ** 2 + y ** 2:
        print('YES')
    elif x ** 2 == y ** 2 + z ** 2:
        print('YES')
    elif y ** 2 == x ** 2 + z ** 2:
        print('YES')
    else:
        print('NO')

Python: for i in range(int(input())):
    a=map(int,raw_input().split())
    if a[0]**2+a[1]**2==a[2]**2:print("Yes")
    else:print("No")

Python: a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO',[sorted(int(x)**2 for x in input().split(' ')) for i in range(int(input()))])]

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

Python: n=int(input())
i=0
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: for make in range(int(input())) :
    temp = [int(_) for _ in input().split()]
    if temp[0]**2 + temp[1] **2 == temp[2]**2 or len(set(temp)) == 2: print('YES')
    else : print('NO')

Python: N = int(input())
ary=[]
ans=[]
for i in range(N):
    ary.append(list(map(int,(input().split()))))
    if 2 * max(ary[-1]) ** 2 == sum(ary[-1][j] ** 2 for j in range(3)):
        ans.append('YES')
    else:
        ans.append('NO')
print('\n'.join(ans))

Python: i=0
N=int(input())
while i<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')
    i=i+1

Python: def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True


def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("Yes")
        else:
            print("NO")

if __name__ == '__main__':
    run()

Python: n=int(input())
N=[]
for i in range(n):
  N.append(list(map(int,input().split())))

for x,y,z in N:
  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: #Volume0-0003
n = int(input())
for a in range(n):
  x,y,z = (input().split())
  x = int(x)
  y = int(y)
  z = int(z)
  for a in range (3):
    if x > y:
      x,y = y,x
    if y > z:
      y,z = z,y
  if z**2 == x**2+y**2:
    print("YES")
  else:
    print("NO")

Python: n=int(input())

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

Python: n = int(input())
for _ in range(n):
	tr = list(map(int, input().split()))
	c = max(tr)
	tr.remove(c)
	wa = sum(map((lambda x: x**2), tr))
	if c**2 == wa: print('YES')
	else: print('NO')

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