#include<bits/stdc++.h>
using namespace std;
#define rep(i,a) for(int i = 0; i < (a); i++)
int main() {
	int n;
	while(cin >> n,n) {
		vector<pair<double,int>> data;
		rep(i,n){
			int index, h, w;
			scanf("%d %d %d", &index, &h, &w);
			data.push_back(make_pair(abs(22.0 - 10000.0 * w / (h * h)),index));
		}
		sort(data.begin(), data.end());
		cout << data[0].second << endl;
	}
	return 0;
}