import math

n = input()

for i in range(n):
    flag = 0
    a = map(int, raw_input().split())
    if(pow(a[0],2)+pow(a[1],2) == pow(a[2],2)):
        flag = 1
    if(pow(a[1],2)+pow(a[2],2) == pow(a[0],2)):
        flag = 1
    if(pow(a[2],2)+pow(a[0],2) == pow(a[1],2)):
        flag = 1
    if flag == 1:
        print "YES"
    else:
        print "NO" import math math n = input() n input() input for i in range(n):
    flag = 0
    a = map(int, raw_input().split())
    if(pow(a[0],2)+pow(a[1],2) == pow(a[2],2)):
        flag = 1
    if(pow(a[1],2)+pow(a[2],2) == pow(a[0],2)):
        flag = 1
    if(pow(a[2],2)+pow(a[0],2) == pow(a[1],2)):
        flag = 1
    if flag == 1:
        print "YES"
    else:
        print "NO" i range(n) range n flag = 0 flag 0 a = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split if(pow(a[0],2)+pow(a[1],2) == pow(a[2],2)):
        flag = 1
     pow(a[0],2)+pow(a[1],2) == pow(a[2],2) pow(a[0],2)+pow(a[1],2) pow(a[0],2) pow a[0] a 0 2 pow(a[1],2) pow a[1] a 1 2 pow(a[2],2) pow a[2] a 2 2 flag = 1 flag 1 if(pow(a[1],2)+pow(a[2],2) == pow(a[0],2)):
        flag = 1
     pow(a[1],2)+pow(a[2],2) == pow(a[0],2) pow(a[1],2)+pow(a[2],2) pow(a[1],2) pow a[1] a 1 2 pow(a[2],2) pow a[2] a 2 2 pow(a[0],2) pow a[0] a 0 2 flag = 1 flag 1 if(pow(a[2],2)+pow(a[0],2) == pow(a[1],2)):
        flag = 1
     pow(a[2],2)+pow(a[0],2) == pow(a[1],2) pow(a[2],2)+pow(a[0],2) pow(a[2],2) pow a[2] a 2 2 pow(a[0],2) pow a[0] a 0 2 pow(a[1],2) pow a[1] a 1 2 flag = 1 flag 1 if flag == 1:
        print "YES"
    else:
        print "NO" flag == 1 flag 1 print print a = map(int, raw_input().split()) map(int, raw_input().split()) a flag = 0 0 flag n = input() input() n flag = 1 1 flag flag = 1 1 flag flag = 1 1 flag
import math

n = input()

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