cnt = gets.to_i
ss = []
cnt.times do |i|
	ss = gets.to_s.split(" ").map(&:to_i)
	if(ss[0]*ss[0]+ss[1]*ss[1]-ss[2]*ss[2]==0 or ss[0]*ss[0]-ss[1]*ss[1]+ss[2]*ss[2]==0 or -ss[0]*ss[0]+ss[1]*ss[1]+ss[2]*ss[2]==0) then
		puts "YES"
	else
		puts "NO"
	end
end