for _ in[0]*int(eval(input())):

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

 print((['NO','YES'][a*a+b*b==c*c]))

import sys

eval(input())

for a,b,c in [sorted(map(int,x.split())) for x in sys.stdin]:

 print((['NO','YES'][a*a+b*b==c*c]))

for _ in [0] * int(eval(input())):
    a, b, c = sorted(map(int, input().split()))
    print((["NO", "YES"][a * a + b * b == c * c]))

import sys

eval(input())
for a, b, c in [sorted(map(int, x.split())) for x in sys.stdin]:
    print((["NO", "YES"][a * a + b * b == c * c]))

-for _ in [0] * int(eval(input())): -    a, b, c = sorted(map(int, input().split())) +import sys + +eval(input()) +for a, b, c in [sorted(map(int, x.split())) for x in sys.stdin]: