for n in range(eval(input())):

  a,b,c=sorted(map(int,input().split()))

  s="YES" if a*a+b*b==c*c else "NO"

  print(s)
for n in range(eval(input())):

  a,b,c=sorted(map(int,input().split()))

  print("YES" if a*a + b*b == c*c else "NO")
for n in range(eval(input())):
    a, b, c = sorted(map(int, input().split()))
    s = "YES" if a * a + b * b == c * c else "NO"
    print(s)

for n in range(eval(input())):
    a, b, c = sorted(map(int, input().split()))
    print("YES" if a * a + b * b == c * c else "NO")

-    s = "YES" if a * a + b * b == c * c else "NO" -    print(s) +    print("YES" if a * a + b * b == c * c else "NO")