#include <iostream>

using namespace std;

const int BMI = 22;

int main()
{
	int n;
	int no, bmi;
	while(cin >> n, n)
	{
		no = 1000001; bmi = 100;
		while(n--)
		{
			int nn, w, h;
			cin >> nn >> h >> w;
			w *= 10000;
			int tmp = BMI - (w / h / h);
			if(tmp < 0) tmp = -tmp;
			if(bmi > tmp) {
				bmi = tmp;
				no = nn;
			}else if(bmi == tmp) {
				if(no > nn) {
					no = nn;
					bmi = tmp;
				}
			}
		}
		cout << no << endl;
	}
	return 0;
}