line = STDIN.gets.chomp.to_i

arg = []
line.times do
  arg << STDIN.gets.chomp
end

arg.each do |l|
  arr = l.split(' ').map(&:to_i)
  max = arr.delete_at(arr.index(arr.max))
  if max**2 == arr[0]**2 + arr[1]**2
    puts "YES\n"
  else
    puts "NO\n"
  end
end