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

#define loop(i,a,b) for(int i=(a);i<int(b);i++)
#define rep(i,b) loop(i,0,b)

int main(){
    int n;
    while(cin>>n && n){
        int a1 = 1000000000;
        double a2 = 10000000;
        vector<pair<double,int>> v(n);
        rep(i,n){
            int x,h,w;
            cin>>x>>h>>w;
            double bmi = 1. * w/h/h*10000;
            if(abs(a2-22)>abs(bmi-22) || (abs(a2-22)==abs(bmi-22) && a1>x)){
                a1 = x;
                a2 = bmi;
            }
        }
        cout << a1 << endl;
    }
}