N = int(eval(input()))

for _ in range(N):

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

    print(("YES" if a*a + b*b == c*c else "NO"))
N = int(eval(input()))

for _ in range(N):

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

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

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

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