n = int(input())
for i in range(n):
    x, y, z =map(int, input().split())
    if x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*y :
        print("YES")
    else:
        print("NO")
 n = int(input()) n int(input()) int input() input for i in range(n):
    x, y, z =map(int, input().split())
    if x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*y :
        print("YES")
    else:
        print("NO") i range(n) range n x, y, z =map(int, input().split()) x map(int, input().split()) map int input().split() ().split () input split y z if x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*y :
        print("YES")
    else:
        print("NO") x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*y x*x + y*y == z*z or y*y + z*z == x*x x*x + y*y == z*z x*x + y*y x*x x x y*y y y z*z z z y*y + z*z == x*x y*y + z*z y*y y y z*z z z x*x x x x*x + z*z == y*y x*x + z*z x*x x x z*z z z y*y y y print("YES") print "YES" print("NO") print "NO" x, y, z =map(int, input().split()) map(int, input().split()) x y, z =map(int, input().split()) map(int, input().split()) y n = int(input()) int(input()) n z =map(int, input().split()) map(int, input().split()) z
n = int(input())
for i in range(n):
    x, y, z =map(int, input().split())
    if x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*y :
        print("YES")
    else:
        print("NO")

