//24
#include<iostream>
#include<cmath>

using namespace std;

int main(){
  for(int n;cin>>n,n;){
    int mi;
    double mb=1<<30;
    while(n--){
      int i;
      double h,w;
      cin>>i>>h>>w;
      double mbid=fabs(w*10000/h/h-22);
      if(mbid<mb||mbid==mb&&i<mi){
	mi=i;
	mb=mbid;
      }
    }
    cout<<mi<<endl;
  }
  return 0;
}