#include <iostream>
#include <cmath>
using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
const double EPS = 1e-10;

int main(){
  int n;
  int id, w, h;
  int best;
  double dif;
  while(cin >> n && n){
    best = 0;
    dif = 1e10;
    rep(i, n){
      cin >> id >> h >> w;
      double d = abs(22.0 - (double)w / ((double)h * h) * 10000);
      if(d < dif || abs(d - dif) < EPS && id < best){
	dif = d;
	best = id;
      }

    }
    cout << best << endl;
  }
  return 0;
}