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

int main(){
  int n;
  int id,h,w;
  double b,bb;
  int bid;
  double t1,t2;

  while(1){
    cin >> n;
    if(!n)break;


    bb = 200000001.0;
    bid = 1000001;
    for(int i=0;i<n;i++){
      cin >> id >> h >> w;
      b = (double)w / ( (double)h/100 * (double)h/100 );
      t1 = abs(22.0-b);
      t2 = abs(22.0-bb);
      if( abs(t1-t2) < 1e-10){
	if(id<bid){
	  bb = b;
	  bid = id;
	}
      }else if(t1 < t2){
	bb = b;
	bid = id;
      }
    }
    cout << bid << endl;
  }
}