#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>

using namespace std;

struct person{ int no; double diff; };

const double EPS = 1e-10;

bool operator<(const person& l, const person& r) 
{
    if(fabs(l.diff - r.diff) < EPS) {
        return l.no < r.no;
    } else {
        return l.diff < r.diff;
    }
}

bool operator>(const person& l, const person& r) 
{
    if(fabs(l.diff - r.diff) < EPS) {
        return l.no > r.no;
    } else {
        return l.diff > r.diff;
    }
}

bool operator==(const person& l, const person& r) 
{
    return (fabs(l.diff - r.diff) < EPS && l.no == r.no);
}

int n;
int main()
{
    while(cin >> n && n) {
        vector<person> ps(n);
        int i, h, w;
        double bmi;
        for(int k = 0; k < n; k++) {
            cin >> i >> h >> w;
            bmi = ((double)w / (h * h)) * 10000;
            ps[k] = (person){i, fabs(22.0 - bmi)};
        }
        sort(ps.begin(), ps.end());
        cout << ps[0].no << endl;
    }
}