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:
#-*-coding:utf-8-*-

def get_input():
    for i in range(int(input())):
        yield "".join(input())

#####end of def get_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")

Submission status: Wrong Answer

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

def get_input():
    for i in range(int(input())):
        yield "".join(input())

#####end of def get_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")

Submission status: Wrong Answer

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

def get_input():
    for i in range(int(input())):
        yield "".join(input())

#####end of def get_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")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(n):
    side = list(map(int,input().split()))

    side.sort()
    if(side[0]**2 + side[1]**2 == side[2]**2):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import sys

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 a == b and b == c:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

Submission status: Wrong Answer

Solution code:
import sys

n = input()
for a,b,c in map(lambda x: map(int,x.split()),sys.stdin.readlines()):
    print("YES" if a*a+b*b==c*c else "NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num=int(input())
numbers=[]
for i in range(num):
    numbers.append(i)
    numbers[i]=[int(k) for k in input().split()]
    numbers[i]=sorted(numbers[i])

for i in range(num):
    if numbers[i][0]^2+numbers[i][1]^2==numbers[i][2]^2:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(n):
 a,b,c=[int(j) for j in input().split()]
 if a==b and b==c:
  print("YES")
 else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
L = [input() for i in range(n)]  #L????????????????´???¨???????????????
for line in L:
	A = line.split()  #A???line??????3????????°???????????????(?????????)
	B = sorted([int(A[i]) for i in range(3)])  #B???A?????°?????????????????????????????????
	if B[2]^2 == B[0]^2 + B[1]^2:
		print('YES')
	else:
		print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
L = [input() for i in range(n)]
for line in L:
	A = line.split()
	B = sorted([int(A[i]) for i in range(3)])
	if B[2]^2 == B[0]^2 + B[1]^2:
		print('YES')
	else:
		print('NO')

Submission status: Wrong Answer

Solution code:
def isRTri(a, b, c):
    return a * a + b * b == c * c

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])
    print "YES" if r else "NO"

Submission status: Wrong Answer

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

Solution code:
from math import *


t = int(input())
l = []
for i in range(0,t):
    a, b, c = map(int, input().split())
    if pow(a,2)+pow(b,2)==pow(c,2):
        l.append("YES")
    else:
        l.append("NO")

for i in range(0,len(l)):
    print(l[i])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
i = 0
while True:
    if n == i:
        break
    else:
        i += 1
    a, b, c = map(int, input().split())
    if c**2 == a**2+b**2:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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 int(z) ** 2 == int(x) ** 2 + int(y) ** 2:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
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 int(z ** 2) == int(x ** 2) + int(y ** 2):
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

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

for i in range(N):
    a.append(map(int, raw_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: Wrong Answer

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

for i in range(N):
    a.append(map(int, raw_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: Wrong Answer

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

for i in range(N):
    a.append(map(int, raw_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_mul = number_1 ** 2
    number_2_mul = number_2 ** 2
    number_3_mul = number_3 ** 2

    if number_1_mul == number_2_mul + number_3_mul:
        print("YES")
    if number_2_mul == number_3_mul + number_1_mul:
        print("YES")
    if number_3_mul == number_1_mul + number_2_mul:
        print("YES")

    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
for i in range(n):
    line = sys.stdin.readline()
    lengths = list(map(int, line.strip().split()))
    if lengths[0] == lengths[1] == lengths[2]:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
print(n)
for i in range(n):
    line = sys.stdin.readline()
    lengths = list(map(int, line.strip().split()))
    if lengths[0] == lengths[1] == lengths[2]:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
import sys

n = int(sys.stdin.readline().strip())
print(n)
for i in range(n):
    line = sys.stdin.readline()
    lengths = sorted(list(map(int, line.strip().split())))
    if lengths[0]**2 + lengths[1]**2 == lengths[2]**2:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

n = input()
for i in sys.stdin:
    a, b, c = sorted(list(map(int, i.split())))
    print("yes" if a*a+b*b == c*c else "no")

Submission status: Wrong Answer

Solution code:
import sys
next(sys.stdin)
for i in sys.stdin:
    a, b, c = sorted(list(map(int, i.split())))
    print("yes" if a*a+b*b == c*c else "no")

Submission status: Wrong Answer

Solution code:
for make in range(int(input())) :
    temp = [int(_) for _ in input().split()]
    if temp[0]**2 + temp[1] **2 == temp[2]**2 : print('YES')
    else : print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = list()

for i in range(n):
    line = input().split(" ")
    if (line[0] == line[1]) or (line[1] == line[2]) or (line[0] == line[2]):
        ans.append("YES")
    else:
        ans.append("NO")

for j in range(n):
    print(ans[j])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    def inputs(N):
        li = []
        count = 0
        try:
            while count < int(N):
                li.append(input())
                count += 1
        except EOFError:
            return li
        return li

    li = inputs(input())
    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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    if n <= 0:
        return None
    li = [input() for _ in range(n)]
    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")
    return None

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    while True:
        try:
            li = [input() for _ in range(n)]
            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: Wrong Answer

Solution code:
while True:
	try:
		a,b,c = map(int, input().split())
	except:
		exit()

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

Submission status: Wrong Answer

Solution code:
while True:
	try:
		a,b,c = sorted(map(int, input().split()))
	except:
		exit()

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

Submission status: Wrong Answer

Solution code:
n=int(input())

for i in range(n):
    s = input().rstrip().split(' ')
    s.sort()
    s0 = int(s[0])
    s1 = int(s[1])
    s2 = int(s[2])
    a = s0**2+s1**2
    if (a == s2**2) :
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list)

def check_tri(len_list):
	import itertools
	flag = True
	for tmp in list(itertools.permutations(len_list)):
		if (tmp[0] + tmp[1]) < tmp[2]:
			flag = False
			break

	if flag == True:
		print('yes')
	else:
		print('no')

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
tr = set()
for i in range(n):
    tr.add(map(int, input().split()))


for n in tr:
    if len(set(n)) == 1:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(n):
    a, b, c = sorted(list(map(int, input().split())))
    if c ** 2 == (a ** 2 + b ** 2):
        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())
    sort = sorted([a, b, c])
    if sort[0]**2 + sort[1]**2 == sort[2]**2:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
for i in range(0, int(input())):
    sidelen = [int(j) for j in input().split(" ")]
    sidelen.sort(reverse=True)
    if(sidelen[0]**2 == sidelen[1]**2+sidelen[2]**2):
        print("Yes")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
for i in range(0, int(input())):
    sidelen = [int(j) for j in input().split(" ")]
    sidelen.sort(reverse=True)
    if(sidelen[0]**2 == sidelen[1]**2+sidelen[2]**2):
        print("TES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())

for c in range(n):
    line = input()
    datas = map(int, line.split())
    li = list(datas) 
    a = li[0]
    b = li[1]
    c = li[2]

    if a < c and b < c:
        a2 = a ** 2
        b2 = b ** 2
        c2 = c ** 2
        if (a2 + b2) == c2:
            print("YES")
        else:
            print("NO")
    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 > b+c and b > c+a and c > b+a:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
for i in range(n):
    a = list(map(int, input().split()))
    m = max(a)
    b = sum([i**2 for i in a if i != m])
    if (m**2 == b):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
for i in range(n):
    e = [int(i) for i in raw_input().split()]
    maxi = max(e)
    e.remove(maxi)
    if maxi ** 2== e[0] **2 + e[1] **2:
        print "Yes"
    else:
        print "No"

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
for i in range(n):
    e = [int(i) for i in raw_input().split()]
    maxi = max(e)
    e.remove(maxi)
    if maxi * maxi== e[0] * e[0] + e[1] * e[1]:
        print "Yes"
    else:
        print "No"

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def tri(a,b,c):
	return a^2 == b^2 + c^2

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
for time in range(int(input())):
	x,y,z = [int(i) for i in input().split()]

Submission status: Wrong Answer

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()]
print(tri(x,y,z))

Submission status: Wrong Answer

Solution code:
import sys

n = int(sys.stdin.readline())

while n > 0:
  d = sys.stdin.readline().split()
  d.sort()
  a,b,c = map(int, d)

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

  n = n-1

Submission status: Wrong Answer

Solution code:
n = int(raw_input())

while n > 0:
  d = raw_input().split()
  d.sort()
  a,b,c = map(int, d)

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

  n = n-1

Submission status: Wrong Answer

Solution code:
def main():

    data_count = int(input())
    data = [tuple(map(int, input().split())) for i in range(data_count)]

    for item in data:
        print('Yes') if item[0]**2 + item[1]**2 == item[2]**2 else print('No')


main()

Submission status: Wrong Answer

Solution code:
def main():

    data_count = int(input())
    data = [tuple(map(int, input().split())) for i in range(data_count)]

    for item in data:
        print('YES') if item[0]**2 + item[1]**2 == item[2]**2 else print('NO')


main()

Submission status: Wrong Answer

Solution code:
import math

def main():

    data_count = int(input())
    data = [tuple(map(int, input().split())) for i in range(data_count)]

    for item in data:
        print('YES') if math.hypot(item[0], item[1]) == float(item[2]) else print('NO')


main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ans=[]
n=raw_input()
for row in range(int(n)):
    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: Wrong Answer

Solution code:
ans=[]
n=raw_input()
for row in range(int(n)):
    line = raw_input()
    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: Wrong Answer

Solution code:
from sys import stdin
ans=[]
firstLine=True
for line in stdin:
    if firstLine:
        firstLine=False
    else:
        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: Wrong Answer

Solution code:
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("YES" * flag + "NO" * flag)

Submission status: Wrong Answer

Solution code:
class triangle():
    def __init__(self,a,b,c):
        self.a = a
        self.b = b
        self.c = c

    def calc(self):
        a = self.a ** 2
        b = self.b ** 2
        c = self.c ** 2

        if a+b == c:
            return True
        else:
            return False

    def print(self):
        ans = self.calc()
        if ans:
            print("YES")
        else:
            print("NO")

def main():
    data = []
    array_size = int(input())

    for i in range(array_size):
        n = input().split()
        a = int(n[0])
        b = int(n[1])
        c = int(n[2])

        data.append(triangle(a,b,c))

    for array in data:
        array.print()

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
ans = []
count = int(raw_input())

for i in range(0,count):
    a,b,c=map(int,raw_input().split())
    if pow(a,2) + pow(b,2) == pow(c,2):
        ans.append("Yes")
    elif pow(a,2) + pow(c,2) == pow(b,2):
        ans.append("Yes")
    elif pow(b,2) + pow(c,2) == pow(a,2):
        ans.append("Yes")
    else:
        ans.append("No")

for i in range(0,count):
    print ans[i]

Submission status: Wrong Answer

Solution code:
count = int(raw_input())

for i in range(0,count):
    a,b,c=map(int,raw_input().split())
    if pow(a,2) + pow(b,2) == pow(c,2):
        print "Yes"
    elif pow(a,2) + pow(c,2) == pow(b,2):
        print "Yes"
    elif pow(b,2) + pow(c,2) == pow(a,2):
        print "Yes"
    else:
        print "No"

Submission status: Wrong Answer

Solution code:
count = int(raw_input())

for i in range(0,count):
    a,b,c=map(int,raw_input().split())
    if pow(a,2) + pow(b,2) == pow(c,2): print 'Yes'
    elif pow(a,2) + pow(c,2) == pow(b,2): print 'Yes'
    elif pow(b,2) + pow(c,2) == pow(a,2): print 'Yes'
    else: print 'No'

Submission status: Wrong Answer

Solution code:
count = int(raw_input())

for i in range(0,count):
    a,b,c=map(int,raw_input().split())
    if a**2 + b**2 == c**2:
        print 'Yes'
    elif a**2 + c**2 == b**2:
        print 'Yes'
    elif b**2 + c**2 == a**2:
        print 'Yes'
    else:
        print 'No'

Submission status: Wrong Answer

Solution code:
count = int(raw_input())

for i in range(0,count):
    a,b,c=map(int,raw_input().split())
    if a**2 + b**2 == c**2 or a**2 + c**2 == b**2 or b**2 + c**2 == a**2:
        print 'Yes'
    else:
        print 'No'

Submission status: Wrong Answer

Solution code:
count = int(raw_input())

for i in xrange(count):
    a,b,c=map(int,raw_input().split())
    if a**2 + b**2 == c**2 or a**2 + c**2 == b**2 or b**2 + c**2 == a**2:
        print 'Yes'
    else:
        print 'No'