N = int(raw_input())

for n in range(N):
  data_set = map(int, raw_input().split())
  a = data_set[0]
  b = data_set[1]
  c = data_set[2]

  if (a ** 2 + b ** 2) == (c ** 2) or (a ** 2 + c ** 2) == (b ** 2) or (b ** 2 + c ** 2) == (a ** 2):
    print "YES"
  else:
    print "NO" N = int(raw_input()) N int(raw_input()) int raw_input() raw_input for n in range(N):
  data_set = map(int, raw_input().split())
  a = data_set[0]
  b = data_set[1]
  c = data_set[2]

  if (a ** 2 + b ** 2) == (c ** 2) or (a ** 2 + c ** 2) == (b ** 2) or (b ** 2 + c ** 2) == (a ** 2):
    print "YES"
  else:
    print "NO" n range(N) range N data_set = map(int, raw_input().split()) data_set map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split a = data_set[0] a data_set[0] data_set 0 b = data_set[1] b data_set[1] data_set 1 c = data_set[2] c data_set[2] data_set 2 if (a ** 2 + b ** 2) == (c ** 2) or (a ** 2 + c ** 2) == (b ** 2) or (b ** 2 + c ** 2) == (a ** 2):
    print "YES"
  else:
    print "NO" (a ** 2 + b ** 2) == (c ** 2) or (a ** 2 + c ** 2) == (b ** 2) or (b ** 2 + c ** 2) == (a ** 2) (a ** 2 + b ** 2) == (c ** 2) or (a ** 2 + c ** 2) == (b ** 2) (a ** 2 + b ** 2) == (c ** 2) a ** 2 + b ** 2 a ** 2 a 2 b ** 2 b 2 c ** 2 c 2 (a ** 2 + c ** 2) == (b ** 2) a ** 2 + c ** 2 a ** 2 a 2 c ** 2 c 2 b ** 2 b 2 (b ** 2 + c ** 2) == (a ** 2) b ** 2 + c ** 2 b ** 2 b 2 c ** 2 c 2 a ** 2 a 2 print print c = data_set[2] data_set[2] c b = data_set[1] data_set[1] b data_set = map(int, raw_input().split()) map(int, raw_input().split()) data_set N = int(raw_input()) int(raw_input()) N a = data_set[0] data_set[0] a
N = int(raw_input())

for n in range(N):
  data_set = map(int, raw_input().split())
  a = data_set[0]
  b = data_set[1]
  c = data_set[2]

  if (a ** 2 + b ** 2) == (c ** 2) or (a ** 2 + c ** 2) == (b ** 2) or (b ** 2 + c ** 2) == (a ** 2):
    print "YES"
  else:
    print "NO"