#include<bits/stdc++.h>
using namespace std;

int main()
{
  int n;
  while( cin >> n, n ) {
    double id, h, w;
    double close_id = (1 << 30), close_bmi = (1 << 30);
    double basic = 22.0;

    while( n-- ) {
      cin >> id >> h >> w;

      double bmi = w / ((h/100) * (h/100));
      if( fabs(basic - bmi) == fabs(basic - close_bmi) ) {
	close_id = min(close_id, id);
      }
      else if( fabs(basic - bmi) < fabs(basic - close_bmi) ) {
	close_id = id;
	close_bmi = bmi;
      }

    }

    cout << close_id << endl;
  }

}