#include <bits/stdc++.h>
using namespace std;

constexpr double eps = 1e-12;

int main() {
    int n;
    while(cin >> n, n) {
        double cur = 1e20;
        int id = 1e9;
        for(int i = 0; i < n; ++i) {
            int p; double h, w; cin >> p >> h >> w;
            h /= 100;
            const double bmi = w / h / h;
            if(abs(cur - bmi) < eps) {
                id = min(id, p);
            } else if(abs(22 - cur) > abs(22 - bmi)) {
                cur = bmi;
                id = p;
            }
        }
        cout << id << endl;
    }
}

