#include <iostream>
#include <cmath>
using namespace std;

int main() {
    int n;
    while (true) {
        cin >> n;
        if (n == 0) return 0;
        int res;
        double diff = 1000000;
        for (int i = 0; i < n; i++) {
            int p;
            double h, w;
            cin >> p >> h >> w;
            double bmi = w / (h / 100.0) / (h / 100.0);
            if (fabs(22.0 - bmi) < diff) {
                diff = fabs(22.0 - bmi); 
                res = p;
            }
        }
        cout << res << endl;
    }
}