#include<stdio.h>
#include<iostream>
using namespace std;
int main(){

int N;
while(1){
	cin>>N;if(N==0)break;
	int i,I=0;
	double w,h;
	double min=0;

	cin>>i>>h>>w;
	h=h/100;
	if(w/h/h<=22)min=22-w/h/h;
	else min=w/h/h-22;
	I=i;
	for(int ii=1;ii<N;ii++)
	{
		cin>>i>>h>>w;
		h=h/100;
		if(min>22-w/h/h&&w/h/h<=22){min=22-w/h/h;I=i;}
		else if(min>w/h/h-22&&w/h/h>22){min=w/h/h-22;I=i;}
	
	}
	cout<<I<<endl;
}
return 0;
}