w=[]     
n = gets.chomp.to_i
n.times do |i|
  l = gets.chomp.split(/ /)
  if l[0] < l[1]
    l[0],l[1] = l[1],l[0]
  end
  if l[0] < l[2]
    l[0],l[2] = l[2],l[0]
  end
  if (l[0].to_i)^2 == ((l[1].to_i)^2 + (l[2].to_i)^2) 
    l = "YES"
  else
    l = "NO"
  end  
  w[i]=l  
end
for i in 0..n-1
  puts w[i]
end
