$N = gets.chomp.to_i
while $N > 0 do
  arr = []
  gets.split(' ').each do |value|
    arr.push(value.to_i)
  end
  arr.sort!
  if (arr[0] ** 2 + arr[1] ** 2) == arr[2] ** 2
    puts 'YES'
  else
    puts 'NO'
  end
  $N -= 1
end