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