for _ in range(int(eval(input()))):

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

    print(('YES' if a[0]**2+a[1]**2==a[2]**2 else'NO'))
for _ in[0]*int(eval(input())):a,b,c=sorted(map(int,input().split()));print((['NO','YES'][a*a+b*b==c*c]))
for _ in range(int(eval(input()))):
    a = sorted(map(int, input().split()))
    print(("YES" if a[0] ** 2 + a[1] ** 2 == a[2] ** 2 else "NO"))

for _ in [0] * int(eval(input())):
    a, b, c = sorted(map(int, input().split()))
    print((["NO", "YES"][a * a + b * b == c * c]))

-for _ in range(int(eval(input()))): -    a = sorted(map(int, input().split())) -    print(("YES" if a[0] ** 2 + a[1] ** 2 == a[2] ** 2 else "NO")) +for _ in [0] * int(eval(input())): +    a, b, c = sorted(map(int, input().split())) +    print((["NO", "YES"][a * a + b * b == c * c]))