#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
	int n;
	while( cin >> n && n ){
		vector< pair< double, int > > list1;
		vector< pair< double, int > > list2;
		for( int i = 0; i < n; ++i ){
			int id, h, w;
			cin >> id >> h >> w;
			double hh = static_cast< double >( h ) / 100;
			double bmi = w / ( hh * hh );
			if( bmi >= 22.0 ){
				list1.push_back( make_pair( bmi, id ) );
			}else{
				list2.push_back( make_pair( bmi, id ) );
			}
		}
		sort( list1.begin(), list1.end() );
		sort( list2.begin(), list2.end() );
		pair< double, int > high, low;
		if( !list1.empty() ){
			high = list1[ 0 ];
		}
		if( !list2.empty() ){
			low = list2[ list2.size() - 1 ];
			vector< pair < double, int > >::reverse_iterator itr = list2.rbegin();
			while( itr != list2.rend() ){
				if( itr->first < low.first ){
					break;
				}
				low = *itr;
				++itr;
			}
		}
		int result = 0;
		if( high.first - 22.0 < 22.0 - low.first ){
			result = high.second;
		}else{
			result = low.second;
		}
		cout << result << endl;
	}

	return 0;
}