Ideal=22

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

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