def bmi(h,w)
  w/h/h
end
loop{
  n=gets.to_i
  break if n.zero?
  nums = Array.new
  diffs_from_bmi = Hash.new
  n.times{
    i,h,w = gets.split.map(&:to_i)
    diffs_from_bmi[i]=(22-bmi(h/100.0,w)).abs
    nums<<i
  }
  nums.sort!
  nums.sort!{|a,b| diffs_from_bmi[a]<=>diffs_from_bmi[b]}
  puts nums.shift
}