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

#define ABS(X) ((X)<0?-(X):(X))
typedef pair<double, int> Subj;

int main(void){  
  int n;
  
  while (cin >> n){
    vector<Subj> v;
    for (int i=0; i<n; i++){
      int id;
      double h,w,bmi;
      cin >> id >> h >> w;
      h /= 100;
      bmi = w/(h*h);
      v.push_back(make_pair(ABS(bmi-22), id));
    }
    sort(v.begin(), v.end());
    cout << v[0].second << endl;
  }
  
  return 0;
}
