#include<stdio.h>
#include<math.h>
int main()
{
	int n,bestIndex,i;
	while(scanf("%d",&n),n)
	{
		double bestBMI=999,h,w,b;
		while(n--)
		{
			scanf("%d%lf%lf",&i,&h,&w);
			b=fabs(w/h/h*10000-22);
			if(bestBMI > b)
				bestBMI = b, bestIndex=i;
		}
		printf("%d\n",bestIndex);
	}
	return 0;
}