#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
int N,I,H,W,R,i;
float B,t;
int main()
{
	for(;scanf("%d",&N),N;)
	{
		R=1000000000;B=99999;
		for(i=0;i<N;i++)
		{
			scanf("%d%d%d",&I,&H,&W);
			t=(float)W*100/(H*H);
			//printf("%f\n",t);
			if(abs(0.22-B)==abs(0.22-t))R=min(R,I);
			if(abs(0.22-B)>abs(0.22-t))
			{
				R=I;
				B=t;
			}
		}
		printf("%d\n",R);
	}
}