#include<stdio.h>
double abs(double t){
	if(t<0)return -t;
	return t;
}
int main(){
	int a;
	while(scanf("%d",&a),a){
		double dist=100000;
		int id;
		for(int i=0;i<a;i++){
			int b;
			double c,d;
			scanf("%d%lf%lf",&b,&c,&d);
			if(abs(d*10000/c/c-22)<dist){
				dist=abs(d*10000/c/c-22);
				id=b;
			}
			//printf("%lf",dist);
		}
		printf("%d\n",id);
	}
}