#include <stdio.h>
#include<math.h>
#include <algorithm>
using namespace std;

double calc(double height,double weight){
	return fabs(22.0 - (weight/((height*height)/10000)));
}

int main(){

	int n,best_index,tmp_index;
	double best_score,tmp_score,height,weight;

	while(true){
		scanf("%d",&n);
		if(n == 0)break;

		scanf("%d %lf %lf",&best_index,&height,&weight);
		best_score = calc(height,weight);

		if(n > 1){
			for(int i = 1; i < n; i++){
				scanf("%d %lf %lf",&tmp_index,&height,&weight);
				tmp_score = calc(height,weight);
				if(tmp_score < best_score){
					best_score = tmp_score;
					best_index = tmp_index;
				}else if(fabs(tmp_score-best_score) < 0.00000001){
					if(tmp_index < best_index){
						best_index = tmp_index;
					}
				}
			}
		}

		printf("%d\n",best_index);

	}

    return 0;
}