// #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <locale>
#include <cctype>
#include <sstream>
using namespace std;

typedef long long LL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef map<int, int> MAPII;
typedef map<double, int> MAPDI;
typedef vector<pair<int, int> > VPII;
typedef multimap<int, string, greater<int> > MuMAPIS;

#define MP make_pair
#define fastIO	cin.tie(0); ios::sync_with_stdio(false);
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
//for gcc (未test)
// #define FOREACH_IT(it,c)	for(typeof(c)::iterator it=(c).begin(); it!=(c).end(); ++it)
//for Visual Studio
#define foreach_it(type,it,c) for(type::iterator it=c.begin(), c_end=c.end(); it!=c_end; ++it)

// ------------------- include, typedef, define END. -------------------

double BMI(int h, int w){
	// h/100 ではダメ, h/100.0 って書く.
	double ret = w / pow(h / 100.0, 2.0);
	return ret;
}

void solve(map<double, int> &bmiList){
	foreach_it(MAPDI, it, bmiList){
		cout << (*it).second << endl;
		break;
	}
}

int main(){
	fastIO;
	int n = 0;
	while (cin >> n,n){
		int i = 0, h = 0, w = 0;
		map<double, int> bmiList;
		while (n--){
			cin >> i >> h >> w;
			bmiList.insert(MP(abs(22.00 - BMI(h, w)), i));
		}
		solve(bmiList);
	}
	return 0;
}