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

int main() {
    while (true) {
        int n;
        cin >> n;
        if (n == 0) {
            break;
        }
        int output;
        double diff = 100;
        for (int i = 0; i < n; i++) {
            int num;
            double h, w;
            cin >> num >> h >> w;
            double bmi = w / pow(h / 100, 2);
            if (fabs(bmi - 22) < diff) {
                diff = fabs(bmi - 22);
                output = num;
            }
        }
        cout << output << endl;
    }
}