x = int(input())
for a in range(x):
 y = map(int,raw_input().split())
 y.sort()
 if y[2]**2-y[1]**2 == y[0]**2:
  print "YES"
 else:
  print "NO" x = int(input()) x int(input()) int input() input for a in range(x):
 y = map(int,raw_input().split())
 y.sort()
 if y[2]**2-y[1]**2 == y[0]**2:
  print "YES"
 else:
  print "NO" a range(x) range x y = map(int,raw_input().split()) y map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split y.sort() y.sort y sort if y[2]**2-y[1]**2 == y[0]**2:
  print "YES"
 else:
  print "NO" y[2]**2-y[1]**2 == y[0]**2 y[2]**2-y[1]**2 y[2]**2 y[2] y 2 2 y[1]**2 y[1] y 1 2 y[0]**2 y[0] y 0 2 print print y = map(int,raw_input().split()) map(int,raw_input().split()) y x = int(input()) int(input()) x
x = int(input())
for a in range(x):
 y = map(int,raw_input().split())
 y.sort()
 if y[2]**2-y[1]**2 == y[0]**2:
  print "YES"
 else:
  print "NO"