BEST = 22

def bmi(h, w)
  return w / (h * 0.01) ** 2
end

until (n = gets.to_i).zero?
  tmp1, best = Float::INFINITY, nil
  
  n.times do
    i, h, w = gets.split.map(&:to_i)
    tmp2 = (BEST - bmi(h, w)).abs
    
    if tmp2 < tmp1
      best = i
      tmp1 = tmp2
    end
  end
  
  puts best
end