#include<iostream>
#include<cmath>
using namespace std;
int main(){
long n,i,m,p,h,w;
double b;
while(cin>>n){
if(n==0)break;
cin>>m>>h>>w;
b=fabs(10000.*w/h/h-22);p=m;
for(i=1;i<n;i++){
cin>>m>>h>>w;
if(b>fabs(10000.*w/h/h-22)||
b==fabs(10000.*w/h/h-22)&&p>m){b=fabs(10000.*w/h/h-22);p=m;}
}
cout<<p<<endl;
}
return 0;
}