#include<iostream>
#include<string>
#include<map>
using namespace std;
int main() {
	int n;
	while (cin >> n&&n!=0) {
		double a = -100;
		long float r=22, r1 = 10000;
		for (int i = 0; i < n; i++) {
			long float id, cm, kg;
			cin >> id >> cm >> kg;
			cm /= 100;
			long float bmi;
			bmi = (kg / (cm*cm));
			long float r2 = r - bmi;
			if (r2 < 0) r2 = 0 - r2;
			if (r1 > r2) {
				r1 = r2;
				a = id;
			}
			else if (r1 == r2&&a<id) {
				a = id;
			}
		}
		cout << a << endl;
	}
}