#include <bits/stdc++.h>

using namespace std;

int main(){
    int n;
    while(true){
        cin>>n;
        if(n==0)break;
        int ans=-1;
        double t=1000000.0;
        for (int i = 0; i < n; ++i) {
            int p;
            double h,w;
            cin>>p>>h>>w;
            h=h/100.0;
            double tbmi=w/(h*h);
            if(t>abs(22.0-tbmi)){
                t=abs(22.0-tbmi);
                ans=p;
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}
