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

int main() {
	int n;
	while(cin >> n, n) {
		vector<pair<double,int> > v;
		for(int i = 0; i < n; i++) {
			pair<double,int> tmp;
			int id, h, w;
			cin >> id >> h >> w;
			tmp.first = fabs(22 - w / ((h / 100.0) * (h / 100.0)));
			tmp.second = id;
			v.push_back(tmp);
		}

		sort(v.begin(), v.end());
		cout << v[0].second << endl;
	}
}