#include <bits/stdc++.h>

using namespace std;

int main(){
    int ans;
    int n;
    while(true){
        cin >> n;
        if(n == 0) break;
        double tmpans = 1000000;
        for(int i = 0;i < n;i++){
            int p;
            double h,w;
            cin >> p >> h >> w;
            h /= 100.0;
            double tmpbmi =  w / ( h*h);
        //    cout <<  p << ":" << tmpbmi << endl;
            if(max(22.0-tmpbmi,tmpbmi-22.0) < tmpans){
                tmpans = max(22.0-tmpbmi,tmpbmi-22.0);
                ans = p;
            }
        }
        cout << ans << endl;
    }
}
