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

int main(){
	int n;
	int id;
	double height, weight;
	double defferencial;
	double bestBody;
	int ans;
	while(cin >> n, n){
		bestBody = 1000;
		for(int i=0; i< n; i++){
			cin >> id >> height >> weight;
			defferencial = abs(22 - weight / pow(height/100, 2));

			if(defferencial < bestBody){
				bestBody = defferencial;
				ans = id;
			}
		}
		cout << ans << endl;
	}

}