#include<iostream>
#include<utility>

typedef std::pair<double, int> P;

int n;

int main()
{
	while( std::cin >> n, n )
	{
		P ans( 201, 1000001 );
		
		while( n-- )
		{
			int i; 
			double h, w;
			std::cin >> i >> h >> w;
			h /= 100.0;
			ans = std::min( ans, P( abs( w / ( h * h ) - 22 ), i ) );
		}

		std::cout << ans.second << std::endl;
	}

	return 0;
}