n = int(raw_input())

for i in range(0, n):
    edge = map(int, raw_input().split(" "))
    edge.sort()
    if edge[2]*edge[2] == edge[0]*edge[0]+edge[1]*edge[1]: print "YES"
    else: print "NO" n = int(raw_input()) n int(raw_input()) int raw_input() raw_input for i in range(0, n):
    edge = map(int, raw_input().split(" "))
    edge.sort()
    if edge[2]*edge[2] == edge[0]*edge[0]+edge[1]*edge[1]: print "YES"
    else: print "NO" i range(0, n) range 0 n edge = map(int, raw_input().split(" ")) edge map(int, raw_input().split(" ")) map int raw_input().split(" ") ().split () raw_input split " " edge.sort() edge.sort edge sort if edge[2]*edge[2] == edge[0]*edge[0]+edge[1]*edge[1]: print "YES"
    else: print "NO" edge[2]*edge[2] == edge[0]*edge[0]+edge[1]*edge[1] edge[2]*edge[2] edge[2] edge 2 edge[2] edge 2 edge[0]*edge[0]+edge[1]*edge[1] edge[0]*edge[0] edge[0] edge 0 edge[0] edge 0 edge[1]*edge[1] edge[1] edge 1 edge[1] edge 1 edge = map(int, raw_input().split(" ")) map(int, raw_input().split(" ")) edge n = int(raw_input()) int(raw_input()) n
n = int(raw_input())

for i in range(0, n):
    edge = map(int, raw_input().split(" "))
    edge.sort()
    if edge[2]*edge[2] == edge[0]*edge[0]+edge[1]*edge[1]: print "YES"
    else: print "NO"