#include "bits/stdc++.h"

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

int main(){
    int n;
    while(cin>>n){
        double Aval = 999999999;
        int Anum = 999999999;

        
        if(n==0)break;
        
        rep(i,n){
            int num,h,w;
            cin>>num>>h>>w;
            double res = w*10000.0/( (h*h) );


            if( abs(Aval-22)>abs(res-22)-1e-9 ||  (abs( abs(Aval-22) - abs(res-22) )<1e-9 && num<Anum)  ){
                Aval = res;
                Anum = num;
            }
        }
        cout<<Anum<<endl;
    }
}