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

double bmi(double w, double h) {
    return (w / (h * h) * 10000);
}

int main() {
    int n;
    while (cin >> n) {
        if (n == 0) break;
        vector< pair<double, int> > diff;
        for (int a = 0; a < n; a++) {
            int i, h, w;
            cin >> i >> h >> w;
            diff.push_back(pair<double, int>(abs(bmi((double)w, (double)h)-22.0), i));
        }
        cout << min_element(diff.begin(), diff.end())->second << endl;
    }
    return 0;
}