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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
number = int(input())

for i in range(number):
  tri = list(map(int, input().split(" ")))

  print(str(tri[0]))
  print(str(tri[1]))
  print(str(tri[2]))

  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: Wrong Answer

Solution code:
N = int(input())

for i in range(N):
    sides = list(map(int, input().split()))
    if max(sides) == min(sides):
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
tri_list = []
N =  int(input())

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

Submission status: Wrong Answer

Solution code:
tri_list = []
N =  int(input())

for i in range(N):
    tri = input()
    tri_list.append(tri.split())
    
for i in range(N):
    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")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
tri_list = []
N =  int(input())

for i in range(N):
    tri = input()
    tri_list.append(tri.split())
    
for i in range(N):
    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")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
tri_list = []
N =  int(input())

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

Submission status: Wrong Answer

Solution code:
tri_list = []
N =  int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N =  int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N =  int(input())

for i in range(N):
    tri = input()
    tri_list = tri.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: Wrong Answer

Solution code:
n =  int(input())

for i in range(n):
    tri = input()
    tri_list = tri.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: Wrong Answer

Solution code:
n =  int(input())

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

Submission status: Wrong Answer

Solution code:
n =  int(input())
for i in range(n):
    tri = input()
    tri_list = tri.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: Wrong Answer

Solution code:
n =  int(input())
for i in range(n):
    tri = input()
    tri_list = tri.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: Wrong Answer

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

Solution code:
tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    tri_list = list(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: Wrong Answer

Solution code:
tri_list = []
n =  int(input())
for i in range(n):
    #tri_list = list(map(int,input().split(" ")))
    k = 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: Wrong Answer

Solution code:
for i in range(int(raw_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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
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: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
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: Wrong Answer

Solution code:
n = int(input())
for i in range(n):
    x, y, z =map(int, input().split())
    if x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*y :
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys


__author__ = 'bisuk'

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

# print("N = "+str(list[0]))
#print(list)
for i in range(1, int(list[0]) + 1):
    #print("i="+str(i) + " :" + list[i]),
    list2 = sorted(list[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")

Submission status: Wrong Answer

Solution code:
import sys

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

# print("N = "+str(list[0]))
#print(list)
for i in range(1, int(list[0]) + 1):
    #print("i="+str(i) + " :" + list[i]),
    list2 = sorted(list[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")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

list0 = []
for line in sys.stdin.readlines():
    list0.append(line)

for i in range(1, int(list0[0]) + 1):
    list2 = sorted(list0[i].strip("\n").split(" "))
    print("i: "+ str(i)),
    if int(list2[0]) * int(list2[0]) + int(list2[1]) * int(list2[1]) == int(list2[2]) * int(list2[2]):
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
rep = input()
while rep:
	rep -= 1
	[a, b, c] = map(int, raw_input().split())
	if a < b:
		if b < c:
			a = a ** 2 + b ** 2
			b = c ** 2
		else:
			a = a ** 2 + c ** 2
			b *= b
	else: # b <= a
		if a < c:
			a = a ** 2 + b ** 2	
			b = c * c
		else:
			a **= 2
			b = b **2 + c ** 2
	print a, b
	if a == b:
		print 'YES'
	else:
		print 'NO'

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python
#-coding:utf-8-

import sys


data_list = []
for s in sys.stdin:
  data_list.append( map(int,s.split()) )
  print data_list

for e in data_list[1:]:
  e.sort()
  if e[0]*e[0] + e[1]*e[1] == e[2] * e[2]:
    print "YES"
  else:
    print "NO"

Submission status: Wrong Answer

Solution code:
n = input()

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Here your code !
N = int(input())

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

Submission status: Wrong Answer

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 side3**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"



if __name__ == "__main__":
	print check_right_triangle(1, 2, 3)

Submission status: Wrong Answer

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 side3**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"



# if __name__ == "__main__":
# 	print check_right_triangle(1, 2, 3)

Submission status: Wrong Answer

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 side3**2 == 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"



if __name__ == "__main__":
	print check_right_triangle(4, 3, 5)

Submission status: Wrong Answer

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 side3**2 == 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"



# if __name__ == "__main__":
# 	print check_right_triangle(4, 3, 5)

Submission status: Wrong Answer

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


def check():
	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"



if __name__ == "__main__":
	check()
	# print check_right_triangle(3, 4, 5)

Submission status: Wrong Answer

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


def check():
	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"



if __name__ == "__main__":
	check()
	# print check_right_triangle(4, 3, 5)
	# print check_right_triangle(4, 3, 6)
	# print check_right_triangle(8, 8, 8)

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
for k in range(n):
    [a,b,c] = map(int,raw_input().split())
    a,b,c = sorted([a,b,c])
    if a**2 + b**2 == c**2:
        print "YES"
    else:
        print "No"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(raw_input())

for i in range(N):
    a = range(3)
    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"

Submission status: Wrong Answer

Solution code:
try:
    list = []
    while True:
        for i in range(0, 3):
            n = int(raw_input())
            list.append(n)
        list.sort()
        print 'YES' if (list[2]**2 == list[0]**2 + list[1]**2) else 'NO'
except:
    pass

Submission status: Wrong Answer

Solution code:
try:
    list = []
    while True:
        for i in range(0, 3):
            n = int(raw_input().split())
            list.append(n)
        list.sort()
        print 'YES' if (list[2]**2 == list[0]**2 + list[1]**2) else 'NO'
except:
    pass

Submission status: Wrong Answer

Solution code:
while True:
    try:
        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")
        

    except:
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(n):
    number = input().split()
    hen1, hen2, hen3 = map(int, number)
    if hen1 == hen2 == hen3:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(n):
    hen = input().split()
    hen1, hen2, hen3 = map(int, hen)
    if hen1 == hen2 == hen3:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:

n = int(input())
for i in range(n):
    hen = input().split()
    hen1, hen2, hen3 = map(int, hen)
    if hen1 == hen2 == hen3:
        print('NO')
    else:
        print('YES')

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
numberOfDataSets = 0
sideLengthList = []

while 1:
	try:
		data = raw_input().split()

		if len(data) == 1 :
			numberOfDataSets = int(data[0])

		elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)

			# Is it a right triangle?
			if int(data[0])*int(data[0]) + int(data[1])*int(data[1]) == int(data[2])*int(data[2]) :
				print"YES"
			else:
				print"NO"
	except:
		break

Submission status: Wrong Answer

Solution code:
numberOfDataSets = 0
sideLengthList = []

while 1:
	try:
		data = raw_input().split()

		if len(data) == 1 :
			numberOfDataSets = int(data[0])

		elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)

		if numberOfDataSets == 0 :
			# Is it a right triangle?
			for i in range(0, len(sideLengthList)) :
				if int(sideLengthList[i][0])*int(sideLengthList[i][0]) + int(sideLengthList[i][1])*int(sideLengthList[i][1]) == int(sideLengthList[i][2])*int(sideLengthList[i][2]) :
					print"YES"
				else:
					print"NO"

	except:
		break

Submission status: Wrong Answer

Solution code:
numberOfDataSets = 0
sideLengthList = []

while 1:
	try:
		data = raw_input().split()

		if len(data) == 1 :
			numberOfDataSets = int(data[0])

		elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)

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

	except:
		break

Submission status: Wrong Answer

Solution code:
n = int(input())

i = 0
while (i < 3):
    L = map(int, raw_input().split())
    L.sort(reverse = True)

    if (pow(L[0], 2) == pow(L[1], 2) + pow(L[2], 2)):
        print "YES"
    else:
        print "NO"

    i += 1

Submission status: Wrong Answer

Solution code:
n=input()
for i in range(0,n):
	a,b,c=map(int, raw_input().split())
	if c*c==a*a+b*b:
		print "yes"
	else:
		print "no"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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]
	print num
	if c*c==a*a+b*b:
		print "YES"
	else:
		print "NO"

Submission status: Wrong Answer

Solution code:
times = int(input())

for i in range(0, times):
	edge = input().split(" ")
	edge.sort()
	if pow(int(edge[0]), 2) + pow(int(edge[1]), 2) == pow(int(edge[2]), 2):
		print("YES")
	else:
		print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

def check(val):
    val.sort()
    a=int(val[0])*int(val[0])
    b=int(val[1])*int(val[1])
    c=int(val[2])*int(val[2])

    flag=(c==a+b)
    return flag

def main():
    N=input()

    while True:
        try:
            a=input()
            val=a.split(" ")
            if check(val):
                print("YES")

            else:
                print("NO")
        except (EOFError,ValueError):
            break

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

def check(val):
    val.sort()
    a=int(val[0])*int(val[0])
    b=int(val[1])*int(val[1])
    c=int(val[2])*int(val[2])

    flag=(c==a+b)
    return flag

def main():
    N=int(input())

    for i in range(N):
        a=input()
        val=a.split(" ")
        if check(val):
            print("YES")

        else:
            print("NO")

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

def check(val):
    val.sort()
    a=int(val[0])*int(val[0])
    b=int(val[1])*int(val[1])
    c=int(val[2])*int(val[2])

    flag=(c==a+b)
    return flag

def main():
    N=int(input())
    LIST=[]

    for i in range(N):
        a=input()
        val=a.split(" ")
        LIST.append(val)
        
    for i in range(N):
        if check(LIST[i]):
            print("YES")

        else:
            print("NO")

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys

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

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(n):
    li = sorted([int(j) for j in input().split()])
    print("Yes" if li[0] ** 2 + li[1] ** 2 == li[2] ** 2 else "No")

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[]
c=[]
for i in range(n):
    a.append([])
    for j in range(3):
        a[i].append([])
print (a)
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])

Submission status: Wrong Answer

Solution code:
num = int(input())
for i in range (num):
    a=input().split()
    print( a[0]==a[1] and a[1]==a[2])

Submission status: Wrong Answer

Solution code:
num = int(input())
for i in range (num):
    a=input().split()
    if a[0]==a[1] and a[1]==a[2]:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
import string
import sys
import math

#??????????????\????????????ip?????\??????
ip = sys.stdin.readlines()
ip_list = {}

#?????????????????§?????????
for i in range(len(ip)):
    ip_list[i] = ip[i].strip("\n").split()

for i in range(len(ip)):
    if len(ip_list[i]) == 1:
        print("YES")
    else:
        if   int(ip_list[i][0]) != int(ip_list[i][1]):
            print("NO")
        elif int(ip_list[i][0]) != int(ip_list[i][2]):
            print("NO")
        else:
            print("YES")

Submission status: Wrong Answer

Solution code:
import string
import sys
import math

#??????????????\????????????ip?????\??????
ip = sys.stdin.readlines()
ip_list = {}

#?????????????????§?????????
for i in range(len(ip)):
    ip_list[i] = ip[i].strip("\n").split()

for i in range(1,len(ip)):
    for j in range(3):
        #?????????????????????
        for t in range(3):
            for k in range(3):
                if int(ip_list[i][t]) > int(ip_list[i][k]):
                    tmp = ip_list[i][t]
                    ip_list[i][t] = ip_list[i][k]
                    ip_list[i][k] = tmp  
                    
for i in range(1,4):   
    if int(ip_list[i][0])**2 == int(ip_list[i][1])**2 + int(ip_list[i][2])**2:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(n):
	x,y,z=map(int,input().split())
	A=[x,y,z]
	A.sort(reverse=True)
	if A[0]**2==A[1]**2+A[2]**2:
		print("Yes")
	else:
		print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(n):
	x,y,z=map(int,input().split())
	if (x+y>z)and(y+z>x)and(z+x>y):
		print("YES")
	else:
		print("NO")

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(n):
	x,y,z=map(int,input().split())
	if x**2+y**2==z**2:
		print("YES")
	else:
		print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

l = []
for i in range(n):
    line = input()

    numl = line.split(' ')

    numl.sort()
    l.append(numl)

for i in range(n):

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

Submission status: Wrong Answer

Solution code:
def check(List):
    List.sort()
    List.reverse()
    if List[0]**2 == List[1]**2+List[2]**2:
        return "Yes"
    else:
        return "No"

N = input()
    
for i in range(N):
    list = map(int, raw_input().split())
    print check(list)

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-

def get_input():
    for i in range(int(input())):
        yield "".join(input())
    print()
  
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")

Submission status: Wrong Answer

Solution code:
#-*-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")