import sys
n = int(input())
for i in range(n):
    ns = [x * x for x in map(int, input().split())]
    if ns[0] + ns[1] == ns[2] or ns[0] + ns[2] == ns[1] or ns[1] + ns[2] == ns[0]:
        print("YES")
    else:
        print("NO") import sys sys n = int(input()) n int(input()) int input() input for i in range(n):
    ns = [x * x for x in map(int, input().split())]
    if ns[0] + ns[1] == ns[2] or ns[0] + ns[2] == ns[1] or ns[1] + ns[2] == ns[0]:
        print("YES")
    else:
        print("NO") i range(n) range n x * x for x in map(int, input().split()) for x in map(int, input().split()) x map(int, input().split()) map int input().split() ().split () input split for x in map(int, input().split()) x * x x x ns = [x * x for x in map(int, input().split())] ns [x * x for x in map(int, input().split())] if ns[0] + ns[1] == ns[2] or ns[0] + ns[2] == ns[1] or ns[1] + ns[2] == ns[0]:
        print("YES")
    else:
        print("NO") ns[0] + ns[1] == ns[2] or ns[0] + ns[2] == ns[1] or ns[1] + ns[2] == ns[0] ns[0] + ns[1] == ns[2] or ns[0] + ns[2] == ns[1] ns[0] + ns[1] == ns[2] ns[0] + ns[1] ns[0] ns 0 ns[1] ns 1 ns[2] ns 2 ns[0] + ns[2] == ns[1] ns[0] + ns[2] ns[0] ns 0 ns[2] ns 2 ns[1] ns 1 ns[1] + ns[2] == ns[0] ns[1] + ns[2] ns[1] ns 1 ns[2] ns 2 ns[0] ns 0 print("YES") print "YES" print("NO") print "NO" n = int(input()) int(input()) n ns = [x * x for x in map(int, input().split())] [x * x for x in map(int, input().split())] ns
import sys
n = int(input())
for i in range(n):
    ns = [x * x for x in map(int, input().split())]
    if ns[0] + ns[1] == ns[2] or ns[0] + ns[2] == ns[1] or ns[1] + ns[2] == ns[0]:
        print("YES")
    else:
        print("NO")