N = int(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(input()) N int(input()) int input() 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") _ range(N) range N a, b, c = sorted(list(map(int, input().split()))) a sorted(list(map(int, input().split()))) sorted list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split b c print("YES" if a*a + b*b == c*c else "NO") print "YES" if a*a + b*b == c*c else "NO" a*a + b*b == c*c a*a + b*b a*a a a b*b b b c*c c c "YES" "NO" a, b, c = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) a N = int(input()) int(input()) N c = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) c b, c = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) b
N = int(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")