#include <bits/stdc++.h>

using namespace std;


int main() {
	int n, p, minP;
	double h, w, currentDiffBMI, minBMI;

	while (cin >> n, n) {
		minBMI = DBL_MAX;
		for (int i = 0; i < n; i++) {
			cin >> p >> h >> w;
			currentDiffBMI = fabs(w / pow(h, 2) * 10000 - 22);
			//cout << p << ends << currentBMI << endl;
			if (fabs(currentDiffBMI - minBMI) < 0.000001) {
				if (p < minP) {
					minBMI = currentDiffBMI;
					minP = p;
				}		
			}
			else if (currentDiffBMI < minBMI) {
				minBMI = currentDiffBMI;
				minP = p;
			}
			//cout << minBMI << ends << minP << endl;
		}
		cout << minP << endl;
	}

	return 0;
}
