#include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    int n;
    double m, kg;
    while(cin >> n, n){
        int num, ans, ansmbi = 2 << 24;
        rep(i, n){
            cin >> num >> m >> kg;
            m /= 100;
            double mbi = kg / (m * m);
            double re = 22 - mbi > 0 ? 22 - mbi: mbi - 22;
            if(ansmbi > re){
                ansmbi = re;
                ans = num;
            }
        }
        cout << ans << endl;
    }
}