#include<iostream>
#include<algorithm>
#include<utility>
#include<vector>
#include<string>
#include<cmath>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

typedef pair<double,string> p;

int main(){
	int n;
	while(cin>>n){
		if(n==0)break;
		vector<p> vec(n);
		rep(i,n){
			double weight[2];
			string num;
			cin>>num>>weight[0]>>weight[1];
			vec[i].first=abs(22-weight[1]/pow(weight[0]*pow(10,-2),2));
			vec[i].second=num;
		}
		sort(vec.begin(),vec.end());
		cout<<vec[0].second<<endl;
	}
	return 0;
}