#include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
using namespace std;

int main(void){
  int n ;
  while(cin>>n,n){
    double min_num,min_bmi;
    double h,w;
    int num;
    cin>>min_num>>h>>w;
    h/=100;
    min_bmi = fabs(w / (h * h) - 22);
    for(int i = 0 ; i < n - 1 ; i ++){
      cin>>num>>h>>w;
      h/=100;
    double bmi = fabs(w / (h*h) - 22);
      //cout<<num<<" "<<h<<" "<<w<<" "<<bmi<<endl;
      if(min_bmi > bmi){
        min_num = num;
        min_bmi = bmi;
      }
      //cout<<min_num<<" "<<min_bmi<<":"<<num<<" "<<bmi<<endl;
    }
    cout<<min_num<<endl;
  }
  
}