#include <iostream>
#include <cmath>
#include <utility>
#include <vector>
#include <algorithm>
using namespace std;
typedef pair<double,int> P;

int main() {
  int n;
  vector<P> V;
  P temp;
  while(cin >> n) {
    V.clear();
    if(n==0) break;
    int k;
    double h,w;
    for(int i=0;i<n;i++) {
      cin >> k >> h >> w;
      temp.first = abs(w / ((h/100)*(h/100)) - 22.0);
      temp.second = k;
      V.push_back(temp);
    }

    sort(V.begin(),V.end());
    temp = V[0];
    cout << temp.second << endl;
  }
}