
import sys
import re


def judge(a, b, c):
    if a ** 2 + b ** 2 == c ** 2:
        return "YES"
    else:
        return "NO"


#file = sys.argv[1]
#lis = open(file, "r").readlines()
lis = sys.stdin.readlines()
lis.pop(0)

for line in lis:
    edges = map((lambda x: int(x)), re.split(" +", line))
    edges.sort()
    r = judge(edges[0], edges[1], edges[2])
    print r import sys sys import re re def judge(a, b, c):
    if a ** 2 + b ** 2 == c ** 2:
        return "YES"
    else:
        return "NO"


#file = sys.argv[1]
#lis = open(file, "r").readlines() judge if a ** 2 + b ** 2 == c ** 2:
        return "YES"
    else:
        return "NO"


#file = sys.argv[1]
#lis = open(file, "r").readlines() a ** 2 + b ** 2 == c ** 2 a ** 2 + b ** 2 a ** 2 a 2 b ** 2 b 2 c ** 2 c 2 return "YES" "YES" return "NO" "NO" a a b b c c lis = sys.stdin.readlines() lis sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines lis.pop(0) lis.pop lis pop 0 for line in lis:
    edges = map((lambda x: int(x)), re.split(" +", line))
    edges.sort()
    r = judge(edges[0], edges[1], edges[2])
    print r line lis edges = map((lambda x: int(x)), re.split(" +", line)) edges map((lambda x: int(x)), re.split(" +", line)) map lambda x: int(x) int(x) int x x re.split(" +", line) re.split re split " +" line edges.sort() edges.sort edges sort r = judge(edges[0], edges[1], edges[2]) r judge(edges[0], edges[1], edges[2]) judge edges[0] edges 0 edges[1] edges 1 edges[2] edges 2 print lis = sys.stdin.readlines() sys.stdin.readlines() lis def judge(a, b, c):
    if a ** 2 + b ** 2 == c ** 2:
        return "YES"
    else:
        return "NO"


#file = sys.argv[1]
#lis = open(file, "r").readlines() def judge(a, b, c):
    if a ** 2 + b ** 2 == c ** 2:
        return "YES"
    else:
        return "NO"


#file = sys.argv[1]
#lis = open(file, "r").readlines() judge edges = map((lambda x: int(x)), re.split(" +", line)) map((lambda x: int(x)), re.split(" +", line)) edges r = judge(edges[0], edges[1], edges[2]) judge(edges[0], edges[1], edges[2]) r

import sys
import re


def judge(a, b, c):
    if a ** 2 + b ** 2 == c ** 2:
        return "YES"
    else:
        return "NO"


#file = sys.argv[1]
#lis = open(file, "r").readlines()
lis = sys.stdin.readlines()
lis.pop(0)

for line in lis:
    edges = map((lambda x: int(x)), re.split(" +", line))
    edges.sort()
    r = judge(edges[0], edges[1], edges[2])
    print r