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

int main(){

	int n, id, h, w, id_best;
	double ideal, best, bmi, eps;

	ideal = 22.0;
	eps = pow(0.1, 5);
	
	while(cin >> n){
		if(n == 0) break;
		
		id_best = 1000000;
		best = 1000.0;
	
		for(int i=0; i<n; i++){
			cin >> id >> h >> w;
			bmi = w / pow(0.01 * h, 2);
			if(best > abs(ideal - bmi) || (best - abs(ideal - bmi) < eps && id_best > id)){
				best = abs(ideal - bmi);
				id_best = id;
			}
		}
	
		cout << id_best << endl;
	}

	return 0;

}