N = int(input())
for i in range(N):
	l = list(map(int,input().split()))
	l.sort()
	if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]: print("YES")
	else: print("NO") N = int(input()) N int(input()) int input() input for i in range(N):
	l = list(map(int,input().split()))
	l.sort()
	if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]: print("YES")
	else: print("NO") i range(N) range N l = list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split l.sort() l.sort l sort if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]: print("YES")
	else: print("NO") l[0]*l[0]+l[1]*l[1] == l[2]*l[2] l[0]*l[0]+l[1]*l[1] l[0]*l[0] l[0] l 0 l[0] l 0 l[1]*l[1] l[1] l 1 l[1] l 1 l[2]*l[2] l[2] l 2 l[2] l 2 N = int(input()) int(input()) N l = list(map(int,input().split())) list(map(int,input().split())) l
N = int(input())
for i in range(N):
	l = list(map(int,input().split()))
	l.sort()
	if l[0]*l[0]+l[1]*l[1] == l[2]*l[2]: print("YES")
	else: print("NO")