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

int main(){
    int n;
    while(cin >> n, n != 0){
        int ideal_id;
        double bmi, weight, height, min_diff = 100000;
        int id;
        for(int i=1; i<=n; i++){
            cin >> id >> height >> weight;
            bmi = weight/((height/100.0)*(height/100.0));
            if(min_diff > abs(bmi-22.0)){
                min_diff = abs(bmi-22.0);
                ideal_id = id;
            }
        }
        cout << ideal_id << endl;
    }
    return 0;
}