#include <iostream>
#include <cmath>

using namespace std;

void solve()
{
	int n;
	while(cin >>n, n)
	{
		int index = 999999999;
		double bmi = 999999999;
		while(n--)
		{
			int i, h, w;
			cin >> i >> h >> w;
			double data = (double)w * 100 * 100 / h / h;
			if(fabs(22 - data) == bmi && index > i)
			{
				index = i;
			}
			else if(fabs(22 - data) < bmi)
			{
				bmi = fabs(22 - data);
				index = i;
			}
		}
		cout << index << endl;
	}
}

int main()
{
	solve();
	return(0);
}