count = gets.chomp.to_i
result = []
count.times do
  a, b, c = gets.chomp.split.map(&:to_i).sort
  if a**2 + b**2 == c**2
    result << 'YES'
  else
    result << 'NO'
  end
end
result.each {|ans| puts ans}