#include <iostream>
#include <cmath>
using namespace std;
int main( void )
{
	int n;
	while ( cin >> n && n )
	{
		int answer = -1;
		double good = 0.0;

		for ( int i = 0; i < n; i++ )
		{
			int no, h, w;
			cin >> no >> h >> w;
			double bmi = (double)w / ( h * h / 10000.0 );
			double score = fabs( 22.0 - bmi );
			if ( answer == -1 || score < good )
			{
				answer = no;
				good = score;
			}
		}

		cout << answer << endl;
	}
}