#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int n;
    while( cin >> n ) {
        if ( n == 0 )
            break;

        double diff = 999999999.9;
        int least = -1;
        for( int i=0; i<n; ++i ) {
            int i, h, w;

            cin >> i >> h >> w;

            double const bmi = static_cast<double>( w ) / pow( static_cast<double>( h ) / 100.0, 2 );

            double const d = abs( 22.0 - bmi );
            if ( d < diff ) {
                diff = d;
                least = i;
            }
        }

        cout << least << endl;
    }
}