n = input()
for i in xrange(n):
    a, b, c = sorted(map(int, raw_input().split()))
    print 'YES' if a*a+b*b==c*c else 'NO' n = input() n input() input for i in xrange(n):
    a, b, c = sorted(map(int, raw_input().split()))
    print 'YES' if a*a+b*b==c*c else 'NO' i xrange(n) xrange 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 print 'YES' if a*a+b*b==c*c else 'NO' a*a+b*b==c*c a*a+b*b a*a a a b*b b b c*c c c 'YES' 'NO' b, c = sorted(map(int, raw_input().split())) sorted(map(int, raw_input().split())) b a, b, c = sorted(map(int, raw_input().split())) sorted(map(int, raw_input().split())) a c = sorted(map(int, raw_input().split())) sorted(map(int, raw_input().split())) c n = input() input() n
n = input()
for i in xrange(n):
    a, b, c = sorted(map(int, raw_input().split()))
    print 'YES' if a*a+b*b==c*c else 'NO'