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