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

int solve() {
  int N; cin >> N;
  if(N == 0) return 1;

  double ideal = 22.0;
  double mi = 1e9; int id = -1;
  for(int i=0; i<N; i++) {
    int p; double h, w; cin >> p >> h >> w;
    h /= 100.0;
    double bmi = w / (h * h);

    double sub = fabs(ideal - bmi);
    if(sub < mi) {
      mi = sub;
      id = p;
    }
  }
  cout << id << endl;
  return 0;
}

int main() {
  while(!solve());
  return 0;
}

