Ideal=22

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

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