#include<stdio.h>
int main(void)
{
	int n,p[1000],h[1000],w[1000],x,y,i;
	scanf("%d",&n);
	while(n!=0){
		for(i=0;i<n;i++) {
			scanf("%d %d %d",&p[i],&h[i],&w[i]);
			h[i]=(double)w[i]/(h[i]*h[i])*10000;
//		printf("p=%d h=%d\n",p[i],h[i]);
			if(h[i]<0)  h[i]=h[i]*-1;
			h[i]=h[i]-22;
			if(h[i]<0)  h[i]=h[i]*-1;
		}
		x=p[0]; y=h[0];
		for(i=1;i<n;i++){
			if(y>h[i]){
				x=p[i];  y=h[i];
			}
		}
		printf("%d\n",x);
		scanf("%d",&n);
	}
	return 0;
}