Problem:


Is it a Right Triangle?

Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.

Input

Input consists of several data sets. In the first line, the number of data set, N is given. Then, N lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.

Constraints

 1 ≤ length of the side ≤ 1,000

 N ≤ 1,000

Output

For each data set, print "YES" or "NO".

Sample Input

3
4 3 5
4 3 6
8 8 8

Output for the Sample Input

YES
NO
NO



Sample input:
3
4 3 5
4 3 6
8 8 8


Sample output:
YES
NO
NO

Submission status: Accepted

Solution code:
time = input()
judge = [''] * 1000

for i in range(time):
	data = map(int, raw_input().split())
	[a, b, c] = sorted(data)
	if a ** 2 + b ** 2 == c ** 2:
		judge[i] = 'YES'
	else:
		judge[i] = 'NO'
	
for j in range(i+1):
	print judge[j]

Submission status: Runtime Error

Solution code:
for i in range(3):
    a,b,c = map(int, raw_input().split())
    if a*a == b*b + c*c:
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
n = int(raw_input())
for i in range(n):
    a,b,c = map(int, raw_input().split()).sort(reverse = True)
    if a*a == b*b + c*c:
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
number = int(input())

for i in range(number):
  tri = map(int, input.split(" "))
  if tri[0] > tri[1]:
    buf = tri[0]
    tri[0] = tri[1]
    tri[1] = buf
  if tri[1] > tri[2]:
    buf = tri[1]
    tri[1] = tri[2]
    tri[2] = buf
  if tri[0] * tri[0] + tri[1] * tri[1] == tri[2] * tri[2]:
    print("YES")
  else:
    print("NO")

Submission status: Runtime Error

Solution code:
number = int(input())

for i in range(number):
  tri = map(int, input().split(" "))
  if tri[0] > tri[1]:
    buf = tri[0]
    tri[0] = tri[1]
    tri[1] = buf
  if tri[1] > tri[2]:
    buf = tri[1]
    tri[1] = tri[2]
    tri[2] = buf
  if tri[0] * tri[0] + tri[1] * tri[1] == tri[2] * tri[2]:
    print("YES")
  else:
    print("NO")

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(n):
	s=input.split()
	for j in range(len(s)):
		s[j]=int(s[j])
	s.sort()
	print("YES" if(pow(s[0],2)+pow(s[1],2)==pow(s[2],2)) else "NO")

Submission status: Runtime Error

Solution code:
N = int(input()) 
for i in range(N) :
   a,b,c = map(int,input().split(" "))
   p = [a,b,c]
   p.sort()
   if pow(p[0],2)+pow(p[1],2)==pow[p[2],2]
   print("YES")
   else
   print("NO")

Submission status: Runtime Error

Solution code:
N = int(input()) 
for i in range(N) :
   a,b,c = map(int,input().split(" "))
   p = [a,b,c]
   p.sort()
   if pow(p[0],2)+pow(p[1],2)==pow[p[2],2]:
     print("YES")
   else
     print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input()) 
for i in range(N) :
   a,b,c = sort(list(map(int,input().split(" "))))
  
   if a**2 + b**2== c**2:
     print("YES")
   else
     print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(n):
    a,b,c = input().split()
    x = int(a)
    y = int(b)
    z = int(c)
    p = [a,b,c]
    p.sort()
    if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
for i in int(input()):
	values = sorted(map(lambda x: x^2, input().split()))
	if values[2] = values[1] + values[0]:
		print 'YES'
	else:
		print 'NO'

Submission status: Runtime Error

Solution code:
for i in int(input()):
	values = sorted(map(lambda x: int(x)^2, input().split()))
	if values[2] == values[1] + values[0]:
		print 'YES'
	else:
		print 'NO'

Submission status: Runtime Error

Solution code:
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'

Submission status: Runtime Error

Solution code:
for i in range(int(input())):
	values = sorted(map(lambda x: int(x)^2, raw_input().split()))
	if values[2] == values[1] + values[0]:
		print('YES')
	else:
		print('NO')

Submission status: Runtime Error

Solution code:
import sys

data_length = int(sys.stdin.readline())
lines[]
for x in xrange(data_length):
	input_line = sys.stdin.readline()
	lines = map(int, input_line.strip().split())
	lines.sort(reverse = True)
	if lines[0]**2 == (lines[1]**2 + lines[2]**2):
		print "YES"
	else:
		print "NO"

Submission status: Runtime Error

Solution code:
def check_right_triangle(side1, side2, side3):
	if side1**2 == side2**2 + side3**2:
		return True
	if side2**2 == side3**2 + side1**2:
		return True
	if sides3**3 == side1**2 + side2**2:
		return True
	return False

for i in range(int(raw_input())):
	sides = map(int, raw_input().split())
	if check_right_triangle(sides[0], sides[1], sides[2]):
		print "YES"
	print "NO"

Submission status: Runtime Error

Solution code:
import sys
x=raw_input()
for abc in sys.stdin:
    L=map(int,abc.split(" ")).sort()
    if L[0]**2 + L[1]**2 == L[2]**2:
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
while True:
    try:
        s=input().split(" ")
        s.sort
        if s[0]**2+s[1]**2=s[2]**:
            print("YES")
        else:
            print("NO")

Submission status: Runtime Error

Solution code:
while True:
    try:
        s=input().split(" ")
        s.sort
        if s[0]**2+s[1]**2=s[2]**:
            print("YES")
        else:
            print("NO")
    except:
        break

Submission status: Runtime Error

Solution code:
while True:
    try:
        s=int.input().split(" ")
        s.sort
        if s[0]**2+s[1]**2=s[2]**:
            print("YES")
        else:
            print("NO")
    except:
        break

Submission status: Runtime Error

Solution code:
while True:
    try:
        s=int(input().split(" "))
        s.sort
        if s[0]**2+s[1]**2=s[2]**:
            print("YES")
        else:
            print("NO")
    except:
        break

Submission status: Runtime Error

Solution code:
n=int(input())???#?????????????????????????????°
for i in range(n)
        s=input().split(" ")
        s=[int(j) for j in s]
        s.sort()
        
        if(s[0]**2+s[1]**2==s[2]**2):
            print("YES")

        else:
            print("NO")

Submission status: Runtime Error

Solution code:
n=int(input())???
for i in range(n)
        s=input().split(" ")
        s=[int(j) for j in s]
        s.sort()
        
        if(s[0]**2+s[1]**2==s[2]**2):
            print("YES")

        else:
            print("NO")

Submission status: Runtime Error

Solution code:
n=int(input())
for i in range(n)
        s=input().split(" ")
        s=[int(j) for j in s]
        s.sort()
        
        if(s[0]**2+s[1]**2==s[2]**2):
            print("YES")

        else:
            print("NO")

Submission status: Runtime Error

Solution code:

def main:
    n = int(input())
    for i in range(n):
        s1, s2, s3 = map(int, input().split())
        if s1 == s2 == s3:
            print('YES')
        else:
            print('NO')



if __name__=="__main__":
    main()

Submission status: Runtime Error

Solution code:
num=int(input())

for i in range(num):
	a,b,c=input().split(" ")
	if(a==b==c):
		print("YES")
	else:	
		print("NO"

Submission status: Runtime Error

Solution code:
for i in range(int(input())):
    a = sorted(map(int,input().split()),reversed = True)
    if a[0]**2 == a[1]**2 + a[2]**2:
        print("YES")
    else:
        print("NO")

Submission status: Runtime Error

Solution code:
def check(List):
    List.sort()
    List.revers()
    if List[0]^2 == List[1]^2+List[2]^2:
        return True
    else:
        return False

while True:
    N = input()
    
    for i in range(N):
        list = []
        for j in range(3):
            list.append(input())
        
        print check(list)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

for line in sys.stdin:
    a,b,c = [int(x) for x in line.split()]
    if (a**2+b**2) == c**2:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
import sys

for line in sys.stdin:
   a,b,c = [int(x) for x in line.split()]
   if (a**2+b**2) == c**2:
      print('YES')
   else:
      print('NO')

Submission status: Runtime Error

Solution code:
import sys

array = []

for line in sys.stdin:
    try:
        array = [int(x) for x in line.split()]
        array.sort()
        if array[2]**2 == (array[0]**2+array[1]**2):
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

Submission status: Runtime Error

Solution code:
import sys

for line in sys.stdin:
    try:
        array = [int(x) for x in line.split()]
        array.sort()
        if array[2]**2 == (array[0]**2+array[1]**2):
            print('YES')
        else:
            print('NO')
    except(ValueError):
        continue

Submission status: Runtime Error

Solution code:
import sys

for line in sys.stdin:
   try:
      array = [int(x) for x in line.split()]
      array.sort()
      if array[2]**2 == (array[0]**2+array[1]**2):
         print('YES')
      else:
         print('NO')
   except(ValueError):
      continue

Submission status: Runtime Error

Solution code:
#coding:UTF-8
def Rec(N,List):
    for i in range(N):
        a=int(List[i].split(" ")[0])
        b=int(List[i].split(" ")[1])
        c=int(List[i].split(" ")[2])
        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")
if __name__=="__main__":
    List=[]
    N=int(input())
    for i in range(N):
        List.append(input())
    Rec(N,List

Submission status: Runtime Error

Solution code:
N = int(raw_input())

for i in range(N):
    line = raw_input()
    a, b, c = sorted(int(i) for i in line.split())

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

Submission status: Runtime Error

Solution code:
N = int(raw_input())

for i in range(N):
    line = raw_input()
    a, b, c = sorted(int(w) for w in line.split())

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

Submission status: Runtime Error

Solution code:
def isRTri(a, b, c):
    if a * a + b * b == c * c: return 1
    else return 0

a = [0, 0, 0]
n = input()
for k in range(n):
    a = map(int, raw_input().split())
    r = isRTri(a[0], a[1], a[2])
    if r: print "YES"
    else: print "NO"

Submission status: Runtime Error

Solution code:
n = input()
a, b, c = sorted(map(int, raw_inpu().split()))
print 'YES' if a*a+b*b==c*c else 'NO'

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
[ 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()))]

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
while (1):
	edges = list(map(int, input().split()))
	if len(edges) == 0:
		break
	edges.sort()

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

Submission status: Runtime Error

Solution code:
[print("YES"if e else"NO")for e in[int(ln.split()[0])**2+int(ln.split()[1])**2==int(ln.split()[2])**2 for ln in __import__("sys").stdin]]

Submission status: Runtime Error

Solution code:
[print("YES"if e else"NO")for e in[int(ln.split()[0])**2+int(ln.split()[1])**2==int(ln.split()[2])**2for ln in __import__("sys").stdin]]

Submission status: Runtime Error

Solution code:
def sankaku(a,b,c):
    if (a*a)+(b*b)==c*c:
        return "Yes"
    elif (a*a)+(c*c)==b*b:
        return "Yes"
    elif (b*b)+(c*c)==a*a:
        return "Yes"
    else:
        return "No"
    
l = 0
l = input().split()
d = int(l[0])
e = int(l[1])
f = int(l[2])

print(sankaku(d,e,f))

Submission status: Runtime Error

Solution code:
N = input()
a = []

for i in range(N):
    a.append(map(int, input().strip().split()))

for j in range(len(a)):
    number_1 = a[j][0]
    number_2 = a[j][1]
    number_3 = a[j][2]

    number_1 = number_1 * 2
    number_2 = number_2 * 2
    number_3 = number_3 * 2

    if number_1 = number_2 + number_3:
        print("YES")
    if number_2 = number_3 + number_1:
        print("YES")
    if number_3 = number_1 + number_2:
        print("YES")

    else:
        print("NO")

Submission status: Runtime Error

Solution code:
N = input()
a = []
answer_list = []

for i in range(N):
    a.append(map(int, input().strip().split()))

for j in range(len(a)):
    number_1 = a[j][0]
    number_2 = a[j][1]
    number_3 = a[j][2]

    number_1 = number_1 * 2
    number_2 = number_2 * 2
    number_3 = number_3 * 2

    if number_1 == number_2 + number_3:
        print("YES")
    if number_2 == number_3 + number_1:
        print("YES")
    if number_3 == number_1 + number_2:
        print("YES")

    else:
        print("NO")

Submission status: Runtime Error

Solution code:
def is_triangle(x, y, z):
    x, y, z = sorted(x, y, z)
    return x**2 + y**2 == z**2

num = int(input())
for i in range(num):
    x, y, z = map(int, input().split())
    triangle = is_triangle(x, y, z)
    if triangle:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def calc_triangle(list):
    a, b, c = list.sprit()

    a_2 = a ** 2
    b_2 = b ** 2
    c_2 = c ** 2

    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"



N = input()
a = []
for i in range(N):
    a.append(input())
    
for i in range(N):
    calc_triangle(a[i])

Submission status: Runtime Error

Solution code:
N = input()
a = [input() for i in range(N)]
for i in range(N):
    a, b, c = list.sprit()

    a_2 = a ** 2
    b_2 = b ** 2
    c_2 = c ** 2

    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"

Submission status: Runtime Error

Solution code:
N = input()
a = []
for i in range(N):
    a.append(map(int, raw_input(.split)))
for i in range(N):
    a = a[i][0] ** 2
    b = a[i][1] ** 2
    c = a[i][2] ** 2

    if a == b + c or b == a + c or c == a + b:
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
N = input()
a = []
for i in range(N):
    a.append(map(int, raw_input().split())
for i in range(N):
    a = a[i][0] ** 2
    b = a[i][1] ** 2
    c = a[i][2] ** 2

    if a == b + c or b == a + c or c == a + b:
        print "YES"
    else:
        print "NO"

Submission status: Runtime Error

Solution code:
deta_set_count = int(input())
for _ in range(deta_set_count):
    k = list(map(int, input().split()))
    k= k.sorted()
    if k[0]**2 + k[1]**2 == k[2]**2:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
N = int(input())
for i in range(N):
    a = list(map(int, input().split()))
    a = sorted(a)
    x,y,z = a[0],a[1],a[2]
    if x**2 + y**2 == z**2:
        print("yes")
    else:
        print("no")

Submission status: Runtime Error

Solution code:
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]):
        print("YES")
    else:
        print("NO")

        }else{
            console.log("NO")
            
        }
    }
});

Submission status: Runtime Error

Solution code:
def main():
    n = input()
    li = [input() for _ in n]
    li = sorted(li)
    a,b,c = int(li[0]),int(li[1]),int(li[2])
    if (a ** 2 + b **2) == c**2:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    if n <= 0:
        return None
    li = [int(input()) for _ in range(n)]
    li = sorted(li)
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = tmp[0],tmp[1],tmp[2]
        if (a**2 + b**2) == c**2:
            print("YES")
        else:
            print("NO")
    return None

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
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()

Submission status: Runtime Error

Solution code:
#coding:utf-8
import numpy as np
ans = []
for i in range(int(raw_input())):
    a,b,c = map(int, raw_input().split())
    if np.sqrt(a**2 + b**2) == c:
        ans.append("YES")
    else:
        ans.append("NO")

for i in ans:
    print i

Submission status: Runtime Error

Solution code:
import numpy as np
import math
ans = []
for i in range(int(raw_input())):
    a,b,c = map(int, raw_input().split())
    if math.sqrt(a**2 + b**2) == c:
        ans.append("YES")
    else:
        ans.append("NO")

for i in ans:
    print i

Submission status: Runtime Error

Solution code:
#coding:utf-8
import numpy as np
import math
ans = []
for i in range(int(raw_input())):
    a,b,c = map(int, raw_input().split())
    if math.sqrt(a**2 + b**2) == c or math.sqrt(b**2 + c**2) == a or math.sqrt(c**2 + a**2) == b:
        ans.append("YES")
    else:
        ans.append("NO")

for i in ans:
    print i

Submission status: Runtime Error

Solution code:
N = int(input())

for i in range(N):
	sides = map(int, input().split())
	longestSide = max(sides)
	sides.remove(longestSide)
	if (longestSide ** 2) == (sides[0] ** 2 + sides[1] ** 2):
		print('YES')
	else:
		print('NO')

Submission status: Runtime Error

Solution code:
n = input()
for i in range(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")

Submission status: Runtime Error

Solution code:
n = input()
for i in range(0, 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")

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
n = int(input())
for i in range(n):
    a, b, c = list(map(int, input())).sort()
    if c ** 2 == (a ** 2 + b ** 2):
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

for i in range(0, n):
    data = list(map(int, input().split(' ')))
    for j in range(0, 3):
        if data[j%3] < data[(j+1)%3] + data[(j+2)%3]:
            continue
        else:
            print('NO')
            exit(1)
    print('YES')

Submission status: Runtime Error

Solution code:
times=int(input())
answers=[]
for i in range(times):
    hen=input().split()
    for j in range(times):
        hen[j]=int(hen[j])
    for j in range(times-1):
        for k in range(times-1):
            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])

Submission status: Runtime Error

Solution code:
times=int(input())
answers=[]
for i in range(times):
    hen=[]
    hen=input().split()
    for j in range(times):
        hen[j]=int(hen[j])
    for j in range(times-1):
        for k in range(times-1):
            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])

Submission status: Runtime Error

Solution code:
inputs = map(int, raw_input().split())
max = max(inputs)

inputs.remove(max)

if max ** 2 == inputs[0] **2 + inputs[1] **2 :
    print "Yes"
else:
    print "No"

Submission status: Runtime Error

Solution code:
N = input()
for i in range(N):
	l = []
	line = raw_input()
	l.append(int(line.split()[0]))
	l.append(int(line.split()[1]))
	l.append(int(line.split()[2]))
	l.sort()
	if l[0]*l[0]+l[1]*l[1]==l[2]*l[2]:
		print("YES")
	else:
		print("NO")

Submission status: Runtime Error

Solution code:
N = int(input())
for i in range(N):
	l = []
	line = raw_input()
	l.append(int(line.split()[0]))
	l.append(int(line.split()[1]))
	l.append(int(line.split()[2]))
	l.sort()
	if l[0]*l[0]+l[1]*l[1]==l[2]*l[2]:
		print("YES")
	else:
		print("NO")

Submission status: Runtime Error

Solution code:
N = int(input())
for i in range(N):
	l = []
	line = raw_input()
	l.append(int(line.split()[0]))
	l.append(int(line.split()[1]))
	l.append(int(line.split()[2]))
	l.sort()
	if l[0]**2+l[1]**2==l[2]**2:
		print("YES")
	else:
		print("NO")

Submission status: Runtime Error

Solution code:
N = int(input())
for i in range(N):
	line = raw_input()
	l = [None]*3
	l[0] = int(line.split()[0])
	l[1] = int(line.split()[1])
	l[2] = int(line.split()[2])
	l.sort()
	if l[0]**2+l[1]**2==l[2]**2:
		print("YES")
	else:
		print("NO")

Submission status: Runtime Error

Solution code:
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???)

Submission status: Runtime Error

Solution code:
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):
		print(???YES???)
	else:
		print(???NO???)

Submission status: Runtime Error

Solution code:
def tri(a,b,c):
	if a^2 == b^2 + c^2:
		return true
	else:
		return false
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???)

Submission status: Runtime Error

Solution code:
for time in range(int(input())):
	x,y,z = [int(i) for i in input().split()]
	if x^2 + y^2 == z^2:
		print(???YES???)
	else:
		print(???NO???)

Submission status: Runtime Error

Solution code:
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???)

Submission status: Runtime Error

Solution code:
# usr/bin/python
# coding: utf-8
################################################################################
# Is it a Right Triangle?
# Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
#
# Input
# Input consists of several data sets. In the first line, the number of data set, N is given. Then, N lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
#
# Constraints
# 1 ??? length of the side ??? 1,000
# N ??? 1,000
# Output
# For each data set, print "YES" or "NO".
#
# Sample Input
# 3
# 4 3 5
# 4 3 6
# 8 8 8
# Output for the Sample Input
# YES
# NO
# NO
#
################################################################################

import math
import fileinput

if __name__ == "__main__":
    for line in fileinput.input():
        a = int(line.split(" ")[0])
        b = int(line.split(" ")[1])
        c = int(line.split(" ")[2])
        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")
    exit(0)

Submission status: Runtime Error

Solution code:
# usr/bin/python
# coding: utf-8
################################################################################
# Is it a Right Triangle?
# Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
#
# Input
# Input consists of several data sets. In the first line, the number of data set, N is given. Then, N lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
#
# Constraints
# 1 ??? length of the side ??? 1,000
# N ??? 1,000
# Output
# For each data set, print "YES" or "NO".
#
# Sample Input
# 3
# 4 3 5
# 4 3 6
# 8 8 8
# Output for the Sample Input
# YES
# NO
# NO
#
################################################################################

import fileinput

if __name__ == "__main__":
    for line in fileinput.input():
        a = int(line.split(" ")[0])
        b = int(line.split(" ")[1])
        c = int(line.split(" ")[2])
        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")
    exit(0)

Submission status: Runtime Error

Solution code:
# usr/bin/python
# coding: utf-8
################################################################################
# Is it a Right Triangle?
# Write a program which judges wheather given length of three side form a right triangle.
# Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
#
# Input
# Input consists of several data sets. In the first line, the number of data set,
# N is given. Then, N lines follow, each line corresponds to a data set.
# A data set consists of three integers separated by a single space.
#
# Constraints
# 1 ??? length of the side ??? 1,000
# N ??? 1,000
# Output
# For each data set, print "YES" or "NO".
#
# Sample Input
# 3
# 4 3 5
# 4 3 6
# 8 8 8
# Output for the Sample Input
# YES
# NO
# NO
#
################################################################################

if __name__ == "__main__":
    line = input()
    a = int(line.split(" ")[0])
    b = int(line.split(" ")[1])
    c = int(line.split(" ")[2])
    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")
    exit(0)

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    line = input()
    a = int(line.split(" ")[0])
    b = int(line.split(" ")[1])
    c = int(line.split(" ")[2])
    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")
    exit(0)

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    line = input()
    a = int(line.split(" ")[0])
    b = int(line.split(" ")[1])
    c = int(line.split(" ")[2])
    if (a*a+b*b==c*c) :
        print("YES")
    else :
        print("NO")

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    line = input()
    a = int(line.split(" ")[0])
    b = int(line.split(" ")[1])
    c = int(line.split(" ")[2])
    if (a*a+b*b==c*c):
        print("YES")
    else:
        print("NO")

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    line = input()
    a = int(line.split(" ")[0])
    b = int(line.split(" ")[1])
    c = int(line.split(" ")[2])
    if (a*a+b*b == c*c):
        print("YES")
    else:
        print("NO")

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
ans=[]
n=raw_input()
while True:
    line = raw_input()
    if not line: break
    a, b, c = (int(i) for i in line.split())
    ans.append('YES' if c*c == a*a + b*b else 'NO' )
for i in ans:
    print i

Submission status: Runtime Error

Solution code:
from sys import stdin
ans=[]
n=raw_input()
for row in range(int(n)):
    line = stdin.readlines()
    a, b, c = (int(i) for i in line.split())
    ans.append('YES' if c*c == a*a + b*b else 'NO' )
for i in ans:
    print i