import Control.Monad

main ::IO ()
main = do
  n <- readLn
  if n == 0
    then return ()
    else do
      ls <- replicateM n getLine
      let ls' = map (map (read :: String -> Int)) (map words ls)
          bmiL = map bmiTuple ls'
          ans = format (foldl1 choice bmiL)
      putStrLn ans
      main

bmiTuple :: [Int] -> (Int,Double)
bmiTuple [p,h,w] = (p,bmi)
  where h' = fromIntegral h
        w' = fromIntegral w
        bmi = (w' * 10000.0) / (h'*h')

choice :: (Int,Double) -> (Int,Double) -> (Int,Double)
choice (p1,v1) (p2,v2)
  | (abs (v1 - 22)) < (abs (v2 - 22)) = (p1,v1)
  | (abs (v1 - 22)) > (abs (v2 - 22)) = (p2,v2)
  | p1 < p2 = (p1,v1)
  | otherwise = (p2,v2)

format :: (Int,Double) -> String
format (p,v) = show p