#include<iostream>
using namespace std;


class person{
public:
	int num;
	double w;
	double h;
	double bmi;
	person(int n,double _w,double _h,double _bmi){
		num=n;w=_w;h=_h;bmi=_bmi;
	}
	double getBMIPoint(){
		if(h!=0)bmi=w/((h/100)*(h/100));
		if(bmi<22){
			return 22-bmi;
		}
		else {
			return bmi-22;
		}
	}
	void print(){
		cout<<num<<" "<<w<<" "<<h<<""<<bmi<<endl;
	}
};
int
main(){
	
	for(int d;cin>>d;){
		if(!d)break;
		person stable=person(0,0,0,100);
		for(int i=0;i<d;i++){
		//	stable.print();
			int num;
			double w,h;
			cin>>num>>h>>w;
			person p=person(num,w,h,0);
		//	p.print();
		//	cout<<p.getBMIPoint()<<endl;
			if(stable.getBMIPoint()>=p.getBMIPoint()){
					if(stable.getBMIPoint()==p.getBMIPoint()){
						if(stable.num<p.num)continue;
					}
					stable=p;
			}
			
		}
		cout<<stable.num<<endl;
	}
	return 0;
}