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

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

const int DES = 22 ;
const double CTOM = 1 / 100 / 100;
typedef pair<double, int> pp;

int main()
{
    int n, id;
    double h, w, bmi;
    while(cin >> n && n)
    {
        vector<pp> p;
        REP(n) 
        {
            cin >> id >> h >> w;
            h /= 100;
            bmi = w / h / h;

            p.push_back(pp(max(DES-bmi, bmi - DES) , id));
        }
        sort(all(p));
        
        cout << p[0].second << endl;
    }
    return 0;
}