#include <iostream>
#include <map>
#include <utility>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
#define pdi pair<double, int>
const double EPS = 1e-10;
int main(){
	int n, h, w;
	pdi a;
	while(cin >> n, n) {
		vector<pdi> v;
		rep(i,n) {
			cin >> a.second;
			cin >> h >> w;
			a.first = abs(w / ((h/100.0) * (h/100.0)) - 22);
			v.push_back(a);
		}
		sort(v.begin(), v.end());

		cout << v[0].second << endl;
		int i = 1;
		while(v[i+1].first - v[i].first < EPS) {
			cout << v[i].second << endl;
			i++;
		}
	}
	return 0;
}