#include <bits/stdc++.h>
#define r(i,a,n) for(i=a;i<n;i++)
#define R(i,a,n) for(int i=a;i>=n;i--)
using namespace std;
int main(){
	int n,a,b;
	double s1,s2,s3,aa;
	while(cin>>n,n){
		aa=99999999.9;
		while(n--){
			cin>>b>>s1>>s2;
			s3=abs(22.0-s2/((s1/100.0)*(s1/100.0)));
			if(aa>s3){
				a=b;
				aa=s3;
			}
		}
		cout<<a<<endl;
	}
}