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

int main(){
    while(true){
      int n;
      cin >> n;
      if(n == 0){
        break;
      }
      int ans=-1;
      double mi=1e9;
      double ideal = 22.0;
      for(int i=0; i<n; i++){
        int p;
        double h, w;
        cin >> p >> h >> w;
        h /= 100;
        double bmi;
        bmi = w/(h*h);
        double riso;
        riso = abs(bmi-22.0);
        if(mi >= riso){
          mi = riso;
          ans = p;
        }
      }
      cout << ans << endl;
    }
  return 0;
}

