gets.chomp.to_i.times do
  arr = gets.chomp.split.map(&:to_i)
  a = arr[0]

  if arr[1] > a
    a = arr[1]
    b = arr[0]
  else
    b = arr[1]
  end

  if arr[2] > a
    c = a
    a = arr[2]
  else
    c = arr[2]
  end

  if a**2 == b**2 + c**2
    puts "YES"
  else puts "No"
  end
end