#include<iostream>
#include<cmath>
using namespace std;

int main(void){
	int n;
	while(1){
		scanf("%d",&n);
		if(n==0)break;
		int an;
		double bmi=1000000;
		for(int i=0;i<n;i++){
			int num;
			double h,w,b;
			cin >> num >> h >> w;
			h=(double)h/100;
			b=w/pow(h,2);
			if(abs(b-22)<bmi){
				an=num;
				bmi=abs(b-22);
			}
		}
		printf("%d\n",an);
	}
    return 0;
}