i = gets.to_i
i.times do
array = gets.split(/\s/)
array[0] = array[0].to_i
array[1] = array[1].to_i 
array[2] = array[2].to_i
if (array[0]^2 + array[1]^2 == array[2]) || (array[0]^2 + array[2]^2 == array[1]^2) || (array[0]^2 == array[1]^2 + array[2]^2)
puts("YES")
else
puts("NO")
end
end