#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen ("testcase.bestbody", "r", stdin );
	string str = "";
	int n;

	while (getline (cin, str ) ){
		stringstream ssn(str);
		ssn >> n;
		
		if (n == 0 ){
			break;
		} // end if
		multimap <double, int> rank;
		int j;

		for (j = 0; j < n; ++j){
			int i, h, w; // index, h[cm], w[kg];  
			getline (cin, str );
			stringstream ss(str);
			ss >> i >> h >> w;
			double bmi = (double)w / ( (h/100.)*(h/100.) );
			double diff = fabs (bmi - 22.0);
			rank.insert (make_pair (diff, i ) );
		} // end for
		multimap <double, int>::iterator it = rank.begin();
		cout << (*it).second << endl;
	} // end loop
		
	return 0;
}