Ideal=22.0

def bmi (h, w)
  w.to_f / h * h
end

while (n = gets.to_i) != 0
  id=0
  t=100
  n.times {
    i, h, w = gets.split.map(&:to_i)
    b=bmi(h, w)
    if ((Ideal-b).abs<(Ideal-t).abs)
      id=i
      t=b
    end
  }
  puts id
end