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

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