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

class Point{
public:
  int n;
  double sa;
  Point (int n = 0, double sa = 0):n(n),sa(sa){}
  bool operator < (const Point &p) const{
    return sa < p.sa;
  }
};

main(){
  int i,j,n;
  Point p[1000000];
  while(1){
    cin >> n;
    if(n == 0) break;
    for(i=0;i<n;i++){
      double h,w;
      cin >> p[i].n >> h >> w;
      p[i].sa = w / pow(h/100,2) - 22.0;
      if(p[i].sa < 0.0) p[i].sa *= -1.0;
    }
    sort(p,p+n);

    cout << p[0].n << endl;
  }
}