n = int(raw_input())
for x in range(n) :
  edges = map(int, raw_input().split())
  a = min(edges); edges.remove(a)
  b = min(edges); edges.remove(b)
  c = edges[0]

  if a**2 + b**2 == c**2 :
    print "YES"
  else :
    print "NO" n = int(raw_input()) n int(raw_input()) int raw_input() raw_input for x in range(n) :
  edges = map(int, raw_input().split())
  a = min(edges); edges.remove(a)
  b = min(edges); edges.remove(b)
  c = edges[0]

  if a**2 + b**2 == c**2 :
    print "YES"
  else :
    print "NO" x range(n) range n edges = map(int, raw_input().split()) edges map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split a = min(edges) a min(edges) min edges edges.remove(a) edges.remove edges remove a b = min(edges) b min(edges) min edges edges.remove(b) edges.remove edges remove b c = edges[0] c edges[0] edges 0 if a**2 + b**2 == c**2 :
    print "YES"
  else :
    print "NO" a**2 + b**2 == c**2 a**2 + b**2 a**2 a 2 b**2 b 2 c**2 c 2 print print n = int(raw_input()) int(raw_input()) n b = min(edges) min(edges) b edges = map(int, raw_input().split()) map(int, raw_input().split()) edges c = edges[0] edges[0] c a = min(edges) min(edges) a
n = int(raw_input())
for x in range(n) :
  edges = map(int, raw_input().split())
  a = min(edges); edges.remove(a)
  b = min(edges); edges.remove(b)
  c = edges[0]

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