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

double BMI(double h, double w) {return w/(h*h);}

int main() {
  int n;
  while(cin >> n && n) {
    vector<vector<int> > v;
    while(n--) {
      vector<int> p(3);
      cin >> p[0] >> p[1] >> p[2];
      v.push_back(p);
    }

    sort(v.begin(), v.end());
    int bestID = v[0][0];
    double bestValue = abs(22.0-BMI(v[0][1]/100.0,v[0][2]));
    for(int i = 1; i < v.size(); ++i) {
      double newValue = abs(22.0-BMI(v[i][1]/100.0,v[i][2]));
      if(newValue < bestValue) {
	bestID = v[i][0];
	bestValue = newValue;
      }
    }
    cout << bestID << endl;
  }
  return 0;
}