# -*- coding: utf-8 -*-

N = int(raw_input())
for i in range(N):
    a, b, c = map(int, raw_input().split())
    if a > c:
        a, c = c, a
    if b > c:
        b, c = c, b
    if a*a+b*b == c*c:
        print "YES"
    else:
        print "NO" N = int(raw_input()) N int(raw_input()) int raw_input() raw_input for i in range(N):
    a, b, c = map(int, raw_input().split())
    if a > c:
        a, c = c, a
    if b > c:
        b, c = c, b
    if a*a+b*b == c*c:
        print "YES"
    else:
        print "NO" i range(N) range N a, b, c = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split b c if a > c:
        a, c = c, a
     a > c a c a, c = c, a a c c a if b > c:
        b, c = c, b
     b > c b c b, c = c, b b c c b 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 c = map(int, raw_input().split()) map(int, raw_input().split()) c N = int(raw_input()) int(raw_input()) N a, b, c = map(int, raw_input().split()) map(int, raw_input().split()) a c = c, a a c b, c = c, b c b a, c = c, a c a c = c, b b c b, c = map(int, raw_input().split()) map(int, raw_input().split()) b
# -*- coding: utf-8 -*-

N = int(raw_input())
for i in range(N):
    a, b, c = map(int, raw_input().split())
    if a > c:
        a, c = c, a
    if b > c:
        b, c = c, b
    if a*a+b*b == c*c:
        print "YES"
    else:
        print "NO"