#include<iostream>
using namespace std;
int main()
{
 while(true){

      int n;

     
	  cin >> n ;
	  
      if(n==0)
         break;

	  double a, h , w;
      double BMI = 0;
      double H = 0;
      double max = 0;
	  double z ;
      int y=0;

      for(int i=0 ;i<n ;i++){
		     
            cin >> a >> h >> w;
            H = h / 100;
		
            BMI = w / H / H;

	
			z = 22 - BMI; 
            if(z < 0){
                z = z * (-1);
            }
		
			if(i == 0){
				max = z;
				y = a;
			}
			
			else if(max > z){
               
                 max = z;
				  y = a;
			}
	  }

			cout << y << endl;

 }
    
 return 0;
}