#include <iostream>
#include <utility>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
#define pint pair<int, int>
int main(){
    int n, h, w;
    pint a;
    while(cin >> n, n) {
        vector<pint> v;
        rep(i,n) {
            cin >> a.second;
            cin >> h >> w;
            a.first = abs(h * h * 22 - w * 10000);
            v.push_back(a);
        }
        sort(v.begin(), v.end());
        cout << v[0].second << endl;
    }
    return 0;
}