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:
x=int(input())
list=[]
for i in range(x):
    a,b,c=input().split()
    list.append((int(a),int(b),int(c)))
    a=int(a)
    b=int(b)
    c=int(c)
    if a*a==b*b+(c*c):
         print('YES')
    elif b*b==a*a+(c*c):
        print('YES')
    elif c*c==a*a+(b*b):
        print('YES')
    else:
        print('NO')

Submission status: Accepted

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(["NO", "YES"][flag])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
t = int(input())
i = 0
def Right_Tri(m,n,o):
    a = (n**2+o**2)**(0.5)
    if m == a:
        return True

while(i<t):
    m,n,o = map(int, input().split())
    if (Right_Tri(m,n,o) or Right_Tri(n,o,m) or Right_Tri(o,m,n) == True):
        print("YES")
    else:
        print("NO")
    i += 1

Submission status: Accepted

Solution code:
N=int(input())

for i in range (N):
    A,B,C = map(int,input().split())
    if A>B>=C:
        if A**2==B**2+C**2:
            print("YES")
        else:
            print("NO")
    elif A>C>=B:
            if A**2==C**2+B**2:
                print("YES")
            else:
                print("NO")
    elif B>A>=C:
        if B**2==A**2+C**2:
            print("YES")
        else:
            print("NO")
    elif B>C>=A:
        if B**2==A**2+C**2:
            print("YES")
        else:
            print("NO")
    elif C>A>=B:
        if C**2==A**2+B**2:
            print("YES")
        else:
            print("NO")
    else:
        if C**2==B**2+A**2:
            print("YES")
        else:
            print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
i = 0
while True:
    a = list((int(x)for x in input().split()))
    a.sort()
    i += 1
    if a[0]**2 + a[1]**2 == a[2]** 2:
        print("YES")
    else:
        print("NO")
    if i == N:
        break

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())
for i in range(N):
    a,b,c=map(int,input().split())
    
    a,b,c=sorted([a,b,c])
    
    if a**2+b**2==c**2:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

i = 0

while True:
    a = list((int(x) for x in input().split()))
    a.sort()

    i += 1

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

    if i == N:
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

for i in range(n):

    a,b,c = map(int,input().split())
    d=[a,b,c]
    d=sorted(d)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
for i in range(n):
    A,B,C=map(int,input().split())
    if (A**2==B**2+C**2 or B**2==A**2+C**2 or C**2==A**2+B**2):
        print('YES')
    else:
        print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N):

    a,b,c=map(int,input().split())
    
    if (a**2==b**2+c**2) or (b**2==a**2+c**2) or (c**2==a**2+b**2):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

Solution code:
N=int(input())


for i in range(N):
    a,b,c=map(int,input().split())
    A=max(a,max(b,c))
    B=min(a,min(b,c))
    C=a+b+c-A-B
    
    if B**2+C**2==A**2:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N):
    a,b,c=map(int,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: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
for i in range(n):
    a, b, c = map(int,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: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
for i in range(n):
    a, b, c  = map(int, input().split())
    d = 2
    e = 1/2
    
    if (a**d+b**d)**e == c or (a**d+c**d)**e == b or (c**d+b**d)**e == a:
        print('YES')
        
    else:
        print('NO')

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
N=int(input())
for i in range(0,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")
    else:
        if c**2==a**2+b**2:
            print("YES")
        else:
            print("NO")
    i+=1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
for i in range (1,N+1):
    a,b,c=map(int,input().split())
    x=max(a,b,c)
    y=min(a,b,c)
    z=a+b+c-x-y
    if x**2==y**2+z**2:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m
N=int(input())
for i in range(N):
    a,b,c=map(int,input().split())
    A = min(a,min(b,c))
    C = max(a,max(b,c))
    B = a+b+c-A-C
    r=m.sqrt(A**2+B**2)
    if C == r:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Volume0-0003
n = int(input())
for a in range(n):
  x,y,z = (input().split())
  x = int(x)
  y = int(y)
  z = int(z)
  for a in range (3):
    if x > y:
      x,y = y,x
    if y > z:
      y,z = z,y
  if z**2 == x**2+y**2:
    print("YES")
  else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N):
    a,b,c=input().split()
    a=int(a)
    b=int(b)
    c=int(c)
    
    X=int(max(a,b,c))
    Y=int(min(a,b,c))
    Z=int(a+b+c-X-Y)
    
    if X**2 == Y**2 + Z**2:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

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")
    elif x**2+z**2==y**2:
        print("YES")
    elif y**2+z**2==x**2:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

solve()

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N):
    a,b,c=sorted(map(int,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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input() )
for i in range(n):
    a, b, c = [int(x) for x in input().split()]
    if (b > a):
        a, b = b, a
    if (c > a):
        a, c = c, a #a = max
    if (b*b + c*c - a*a == 0):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N):
    a,b,c=map(int,input().split())
    A=min(a,min(b,c))
    C=max(a,max(b,c))
    B=a+b+c-A-C
    if A**2+B**2==C**2:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N):
    a,b,c=map(int,input().split())
    A=a*a
    B=b*b
    C=c*c
   
   
    if a>b and a>c and A==B+C:
        print('YES')
    elif b>a and b>c and B==A+C:
        print('YES')
    elif c>a and c>b and C==A+B:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=int(input())
jon=[]
while True:
    try:
        jon.append(input())
    except:
        break
for i in jon:
    pon=sorted(list(map(int,i.split())),reverse=True)
    if pon[0]**2==pon[1]**2+pon[2]**2:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
for i in range(n):
    a,b,c=map(int,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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution 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")
    elif b*b==a*a+c*c:
        print("YES")
    elif c*c==a*a+b*b:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
n=input()
n=int(n)
for i in range(n):
    a,b,c=map(int,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: Accepted

Solution code:
N = int(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: Accepted

Solution code:
x = int(input())
for i in range(x):
    a , b , c = list(map(int,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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i=0
N=int(input())
for i in range(N):
    i+=1
    a,b,c=map(int,input().split())
    if a>=c and a>=b:
        if a**2==b**2+c**2:
            print('YES')
        else:
            print('NO')
    elif b>=a and b>=c:
        if b**2==a**2+c**2:
            print('YES')
        else:
            print('NO')
    elif c>=a and c>=b:
        if c**2==a**2+b**2:
            print('YES')
        else:
            print('NO')

Submission status: Accepted

Solution 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")
    elif b*b+c*c == a*a :
        print("YES")
    elif c*c+a*a == b*b :
        print("YES")
    else :
        print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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+c**2==a**2:
        print("YES")
    elif a**2+c**2==b**2:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
for i in range(N):
   a, b, c = map(int, input().split())
   if a > b:
      a, b = b, a
   if b > c:
      b, c = c, b
   if a > b:
      a, b = b, a
   if c * c - a * a - b * b == 0:
      print("YES")
   else:
      print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Solution code:
N=int(input())
i=1
t=0
while i<N+1:
    a,b,c=map(int,input().split())
    if a>b:
        t=a;a=b;b=t
    if b>c:
        t=b;b=c;c=t
    if a>b:
        t=a;a=b;b=t 
    if a*a + b*b == c*c:
        print("YES")
    else:
        print("NO") 
    i=i+1

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
list_a=[]
list_b=[]
list_c=[]
N=int(input())
for i in range(N):
   a,b,c=map(int,input().split())
   list_a.append(a)
   list_b.append(b)
   list_c.append(c)

for i in range(N):
   list_a[i],list_b[i],list_c[i]=sorted([list_a[i],list_b[i],list_c[i]])
   x=list_a[i]
   y=list_b[i]
   z=list_c[i]
   if x**2+y**2==z**2:
      print("YES")
   else:
      print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution 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")
    elif b*b==a*a+c*c:
        print("YES")
    elif c*c==a*a+b*b:
        print("YES") 
    else:
        print("NO")

Submission status: Accepted

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 a**2+c**2==b**2:
        print("YES")
    elif b**2+c**2==a**2:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a=int(input())

for _ in range(a):
    x,y,z=sorted(list(map(int,input().split())))
    print("YES" if x**2+y**2==z**2 else "NO")

Submission status: Accepted

Solution code:
N = int(input())
i=0
while i < N:
 x,y,z = map(int,input().split())
 if x<=z and y<=z: 
     if z**2 == x**2+y**2: print("YES")
     else: print("NO")
 elif x<=y and z<=y:
     if y**2 == x**2+z**2: print("YES")
     else: print("NO")
 else: 
     if x**2 == y**2+z**2: print("YES")
     else: print("NO")

 i += 1

Submission status: Accepted

Solution code:
a=int(input())
for i in range(a):
    x,y,r=map(int,input().split())
    l=[]
    l.append(x)
    l.append(y)
    l.append(r)
    for t in range(2):
        if l[t]>l[t+1]:
            l[t],l[t+1]=l[t+1],l[t]
    if (l[0]**2)+(l[1]**2)==l[2]**2:
        print("YES")
    else:
        print("NO")
    del l

Submission status: Accepted

Solution code:
def san(a,b,c):
    if (a**2)==(b**2)+(c**2):
        print('YES')
    elif (b**2)==(a**2)+(c**2):
        print('YES')
    elif (c**2)==(b**2)+(a**2):
        print('YES')
    else:
        print('NO')
N = int(input())
for i in range(N):
    x, y, z = map(int,input().split())
    san(x,y,z)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N = int(input())

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

Submission status: Accepted

Solution code:
#volume0 0003
N = int(input())
for i in range(N):
    x , y , z= map(int,input().split())
    if x > y:
        min = x
        x = y
        y = min
    if y > z:
        mid = y
        y = z
        z = mid
    if x > y:
        min = x
        x = y
        y = min
    if z**2 == x**2 + y**2:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
i=1
N=int(input())
while i<=N:
    x,y,z=map(int,input().split())
    if x**2+y**2==z**2:
        print('YES')
        i+=1
    elif y**2+z**2==x**2:
        print('YES')
        i+=1
    elif x**2+z**2==y**2:
        print('YES')
        i+=1
    else:
        print('NO')
        i+=1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i=0
N=int(input())
while i<N:
    a,b,c=map(int,input().split())
    if a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a:
        print('YES')
    else:
        print('NO')
    i=i+1