import sys

r = []

n = int(eval(input()))

l = sys.stdin.readlines()

for i in l:

  x, y, z = sorted([x*x for x in list(map(int, i.split()))])

  if x + y == z:

      print("YES")

  else:

      print("NO")
import sys



n = int(input())

l = sys.stdin.readlines()

s = ""

for i in l:

  x, y, z = sorted(map(lambda x:x*x,map(int, i.split())))

  if x + y == z:

      s += "YES\n"

  else:

      s += "NO\n"



print(s,end="")

import sys

r = []
n = int(eval(input()))
l = sys.stdin.readlines()
for i in l:
    x, y, z = sorted([x * x for x in list(map(int, i.split()))])
    if x + y == z:
        print("YES")
    else:
        print("NO")

import sys

n = int(input())
l = sys.stdin.readlines()
s = ""
for i in l:
    x, y, z = sorted(map(lambda x: x * x, map(int, i.split())))
    if x + y == z:
        s += "YES\n"
    else:
        s += "NO\n"
print(s, end="")

-r = [] -n = int(eval(input())) +n = int(input()) +s = "" -    x, y, z = sorted([x * x for x in list(map(int, i.split()))]) +    x, y, z = sorted(map(lambda x: x * x, map(int, i.split()))) -        print("YES") +        s += "YES\n" -        print("NO") +        s += "NO\n" +print(s, end="")