#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

using namespace std;

int main(void){
	int n;
	while(cin >> n && n){
		vector<int> cand;
		double mindiff = 1e+10;
		double bmi;
		int i,h,w;
		for(int j=0;j<n;j++){
			cin >> i >> h >> w;
			bmi = (double)w / (((double)h/100)*((double)h/100));
			//cout << i << " " << h  << " " << w << endl;
			//cout << bmi << endl;
			if(fabs(22-bmi) < mindiff){
				cand.clear();
				mindiff = fabs(22-bmi);
				cand.push_back(i);
			}else if(fabs(mindiff - fabs(22-bmi)) < 1e-4 ){
				cand.push_back(i);
			}
		}
		sort(cand.begin(),cand.end());
		cout << cand[0] << endl;
	}
}