#include <iostream>
#include <cmath>
#include <cstdlib>
#include <map>
using namespace std;

int main(){
    typedef pair<int,long double> P;
    int n,tmp;
    long double tmp1,tmp2;
    while(cin >> n,n){
        P p;
        p.first = 1000001;
        p.second = 10000;
        for(int i=0;i<n;i++){
            cin >> tmp >> tmp1 >> tmp2;
            tmp1 /= 100;
            tmp1 *= tmp1;
            tmp2 /= tmp1;
            tmp2 -= 22.000;
            tmp2 = fabs(tmp2);
            if(tmp2 < p.second || (tmp2 <= p.second && tmp < p.first)){
                p.first = tmp;
                p.second = tmp2;
            }
        }
        cout << p.first << endl;
    }
}