#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)

int main(void){
  int n;
  while(cin>>n){
    if(n==0) break;
    vector<pair<double,int> > data;
    REP(i,n){
      int num;
      double h,w;
      cin>>num>>h>>w;
      data.push_back(pair<double, int>(w*10000/(h*h), num));
    }
    sort(data.begin(), data.end());
    vector<pair<double,int> >::iterator itl, itu;
    itl = lower_bound(data.begin(), data.end(), pair<double,int>(22,0));
    itu = (itl!=data.begin())?itl-1:itl;
    if(abs(22-(*itl).first)>abs(22-(*itu).first)){
      cout<<(*itu).second<<endl;
    }else{
      cout<<(*itl).second<<endl;
    }
  }

  return 0;
}